Rank: Advanced Member
Groups: Approved
Joined: 9/26/2018(UTC) Posts: 73 Location: 北京 Thanks: 18 times Was thanked: 1 time(s) in 1 post(s)
|
It works like 'sp.IsKeyToggled(vk.CAPITAL);'. Thanks.
|
|
|
|
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,349 Location: Tampa, FL Thanks: 28 times Was thanked: 416 time(s) in 354 post(s)
|
Code:if(sp.GetKeyState(vk.LBUTTON) & 0x8000) {
sp.MessageBox("Left down", "Left")
}
if(sp.GetKeyState(vk.MBUTTON) & 0x8000) {
sp.MessageBox("Middle down", "Middle")
}
|
1 user thanked Rob for this useful post.
|
|
|
Rank: Advanced Member
Groups: Approved
Joined: 9/26/2018(UTC) Posts: 73 Location: 北京 Thanks: 18 times Was thanked: 1 time(s) in 1 post(s)
|
|
|
|
|
Rank: Advanced Member
Groups: Approved
Joined: 9/26/2018(UTC) Posts: 73 Location: 北京 Thanks: 18 times Was thanked: 1 time(s) in 1 post(s)
|
HelloRob. About sp.GetKeyState, how can it monitor the scrolling state of the mouse wheel? I looked up some introduction information of VK key value, but it seems that there is no such content. Edited by user Friday, February 19, 2021 12:20:59 AM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Administration
Groups: Translators, Members, Administrators Joined: 1/11/2018(UTC) Posts: 1,349 Location: Tampa, FL Thanks: 28 times Was thanked: 416 time(s) in 354 post(s)
|
Scroll events don't have a "state", because they cannot be held down, they just happen instantly. You can use Global Actions > Mouse Events > Mouse Wheel to catch those events and do stuff, but you can't check the state of the mouse wheel as it fires and that's the end of it. You can also use the mouse wheel event hook: https://forum.strokesplus.net/posts/t7209-Mouse---Keyboard-Event-Subscriptions
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The StrokesPlus.net Forum uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close