SA-MP Forums Archive
what will be the SHIFT key called in OnPlayerKeyStateChange - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: what will be the SHIFT key called in OnPlayerKeyStateChange (/showthread.php?tid=545157)



what will be the SHIFT key called in OnPlayerKeyStateChange - SpikY_ - 06.11.2014

My question is same as my thread subject name.

what will be the SHIFT key called in OnPlayerKeyStateChange?


Re: what will be the SHIFT key called in OnPlayerKeyStateChange - HY - 06.11.2014

KEY_JUMP => LSHIFT

https://sampwiki.blast.hk/wiki/Keys


Re: what will be the SHIFT key called in OnPlayerKeyStateChange - Toxik - 06.11.2014

KEY_JUMP
https://sampwiki.blast.hk/wiki/Keys


Re: what will be the SHIFT key called in OnPlayerKeyStateChange - Pottus - 06.11.2014

It could be anything depends on how the user has their keys set!


Re: what will be the SHIFT key called in OnPlayerKeyStateChange - SpikY_ - 06.11.2014

.. ok thx


Re: what will be the SHIFT key called in OnPlayerKeyStateChange - mkmk - 06.11.2014

KEY_JUMP

rep if i help


Re: what will be the SHIFT key called in OnPlayerKeyStateChange - Capua - 06.11.2014

Quote:
Originally Posted by ******
Посмотреть сообщение
To elabolrate on what Pottus said: you can't detect a specific keyboard key. "shift", "space", "e" etc are not sent to the server, only the functions that they may or may not trigger. For example, I always map "jump" to "right-mouse", so when your server receives "KEY_JUMP" you have no way of knowing what physical input the user used, only what action they performed. They jumped - they didn't press "space".
I wonder why they yet didn't implement a detection for all keys.


Re: what will be the SHIFT key called in OnPlayerKeyStateChange - Sithis - 06.11.2014

Quote:
Originally Posted by Capua
Посмотреть сообщение
I wonder why they yet didn't implement a detection for all keys.
Because hooking into default GTA:SA controls is easier than creating a completely new system for detecting keypresses, especially if it needs to work at the same time as the default controls for moving around in the game world.


Re: what will be the SHIFT key called in OnPlayerKeyStateChange - Pottus - 06.11.2014

Keylogging of course.