Full Keyboard Detection in SA-MP -
Dubya - 30.08.2014
Well, just wondering why no-one has ever added full keyboard detection using GTA SA's keyhooks?
I've suggested it to SA-MP+ many times yet they say someone's going to make it a hack to be a keylogger, yet GTA SA's keyhooks only respond to GTA SA, meaning that a keylogger wouldn't be possible with it.
Please reply with feedback on what you think of this.
Re: Full Keyboard Detection in SA-MP -
Faisal_khan - 30.08.2014
I think that those keys which are supported by the SA Client can only be used. To use the rest, some client modifications has to be done.
This is my assumption, correct me if I am wrong.
Re: Full Keyboard Detection in SA-MP -
[XST]O_x - 30.08.2014
I think iPleomax's textdraw editor uses something like this. However, these sort of plugins are only detecting the HOST keys. Any other players' keys won't be detected. So it's pretty useless unless for specific uses, like the textdraw editor.
I don't think it's possible to apply the key detection to players besides the host.
Re: Full Keyboard Detection in SA-MP -
Pottus - 30.08.2014
It will never happen we got what we got adapt to it.
Re: Full Keyboard Detection in SA-MP -
Khanz - 30.08.2014
No! I don't want my privacy invaded SAMP doesn't need to log every key.
Re: Full Keyboard Detection in SA-MP -
Mauzen - 30.08.2014
Use ALT and the aim key as modifiers and you got 3x as much keys available.
And I doubt that 99% of the servers could make a real use of all those keys. People just arent creative enough.
And if you think the players couldnt remember all the key combinations, they also wouldnt remember all the single keys from the whole keyboard.
Re: Full Keyboard Detection in SA-MP -
MicroD - 30.08.2014
Tell me what you'd do with key detection and I will tell you if it's possible to do it as of right now.
Re: Full Keyboard Detection in SA-MP -
Rifa4life - 30.08.2014
Quote:
Originally Posted by Mauzen
Use ALT and the aim key as modifiers and you got 3x as much keys available.
And I doubt that 99% of the servers could make a real use of all those keys. People just arent creative enough.
And if you think the players couldnt remember all the key combinations, they also wouldnt remember all the single keys from the whole keyboard.
|
Believe you me, that I would make great use of such keys, if they were in fact detectable. I have an item system and shortening commands to just keys was a massive improvement in terms of ease of use of the system. Shame that the only key that I had available was "Y" to search for items, because others such as P would have been great.
I will be greatful if you explain either here or on PM what exactly you mean by using ALT and the aim key as modifiers to make more keys accessible. Sounds promising.
Re: Full Keyboard Detection in SA-MP -
Mauzen - 31.08.2014
Quote:
Originally Posted by Rifa4life
Believe you me, that I would make great use of such keys, if they were in fact detectable. I have an item system and shortening commands to just keys was a massive improvement in terms of ease of use of the system. Shame that the only key that I had available was "Y" to search for items, because others such as P would have been great.
I will be greatful if you explain either here or on PM what exactly you mean by using ALT and the aim key as modifiers to make more keys accessible. Sounds promising.
|
Thats pretty simple. Usually you wont assign an action to ALT (the walking key) or the aim key, because people frequently use them for other stuff. So why not use them in combinations with other keys? Like ALT+Y and AIM+Y having different jobs than Y alone. (you could even consider the key press order, so ALT+Y wouldnt be the same as Y+ALT, but thats admittedly too confusing for most applications and "unnatural")
In most cases it wont harm if people walk or aim when using those keys, but it would harm if they shoot or jump, thats why I wouldnt use those keys as modifiers. The sprint key (space usually) would also make a good modifier as it has no real effect by itself, but people might feel uncomfortable with this as you usually dont use the space key in combination with other keys, so this feels kind of weird. But it would work if you need even more keys.
So using just the four unassigned keys (y,n,g,h) with the modificators you got 12 different key detections (16 with space) plus combinations of the modificator keys (ALT+SPACE, AIM+SPACE, AIM+ALT) if youre desperately in need of more keys

And thats what I said, I doubt most people could ever make a real use of 19 different key detections, except theyre trying to build a real-time strategy game in samp
Re: Full Keyboard Detection in SA-MP -
Rifa4life - 31.08.2014
Quote:
Originally Posted by Mauzen
Like ALT+Y and AIM+Y
|
I see what you meant now, by saying modifiers. I thought that you're talking about using those keys to perhaps for other keys being pressed. But nevermind. In fact I already have some key combinations used in my gamemode of which I consider this to be the most effective. I used it for starting the engine up.
Code:
if((newkeys & KEY_ACTION) && (newkeys & KEY_HANDBRAKE))
For some bizarre reason I did not think about using a combination with the other letter keys, so thank you for your post because it got me on the right thinking path.
Quote:
Originally Posted by Mauzen
but thats admittedly too confusing for most applications and "unnatural"
|
Given that players already compain if they have to use more than one key per operation, it's hard not to agree with you that it's too confusing.
Quote:
Originally Posted by Mauzen
And thats what I said, I doubt most people could ever make a real use of 19 different key detections
|
You're most probably right but it might also be due to the fact that it will be a pain for players to remember all kinds of different combinations. They'll just go the old way and type an adequate command. I do see an application for what you said though, but I need to think about that to make it as effective as I can.
Thanks again for the tip
Re: Full Keyboard Detection in SA-MP -
Y_Less - 31.08.2014
1) Not going to happen.
2) You lot need to stop talking about keys like "alt" and "space" - those are all remappable and so depend on what the player has assigned to those functions. Saying "press alt+y to do X" won't work if "alt" isn't their walk key. AFAIK, only "Y", "N", and "G" are not remappable so you can say "press walk+y to do X".
Re: Full Keyboard Detection in SA-MP -
iFarbod - 31.08.2014
All keys must be detectable, this is the GM developer's fault How going to use keys.
Keys that are detectable now (by SA's engine):
I Don't know if these are usable in SA-MP Or not.
OnFoot:
~k~~GO_LEFT~
~k~~GO_RIGHT~
~k~~GO_FORWARD~
~k~~GO_BACK~
~k~~PED_1RST_PERSON_LOOK_LEFT~
~k~~PED_1RST_PERSON_LOOK_RIGHT~
~k~~PED_1RST_PERSON_LOOK_UP~
~k~~PED_1RST_PERSON_LOOK_DOWN~
~k~~PED_ANSWER_PHONE~
~k~~PED_FIREWEAPON_ALT~
~k~~PED_CYCLE_WEAPON_LEFT~
~k~~PED_SNIPER_ZOOM_IN~
~k~~PED_LOCK_TARGET~
~k~~PED_CYCLE_WEAPON_RIGHT~
~k~~PED_SNIPER_ZOOM_OUT~
~k~~GROUP_CONTROL_FWD~
~k~~GROUP_CONTROL_BWD~
~k~~CONVERSATION_NO~
~k~~CONVERSATION_YES~
~k~~CAMERA_CHANGE_VIEW_ALL_SITUATIONS~
~k~~PED_JUMPING~
~k~~VEHICLE_ENTER_EXIT~
~k~~PED_SPRINT~
~k~~PED_FIREWEAPON~
~k~~PED_DUCK~
~k~~PED_LOOKBEHIND~
~k~~SNEAK_ABOUT~
~k~~PED_CYCLE_TARGET_LEFT~
~k~~PED_CYCLE_TARGET_RIGHT~
~k~~PED_CENTER_CAMERA_BEHIND_PLAYER~
InVehicle:
~k~~VEHICLE_STEERLEFT~
~k~~VEHICLE_STEERRIGHT~
~k~~GO_FORWARD~
~k~~GO_BACK~
~k~~VEHICLE_TURRETLEFT~
~k~~VEHICLE_TURRETRIGHT~
~k~~VEHICLE_TURRETUP~
~k~~VEHICLE_TURRETDOWN~
~k~~VEHICLE_FIREWEAPON_ALT~
~k~~VEHICLE_LOOKLEFT~
~k~~VEHICLE_HANDBRAKE~
~k~~VEHICLE_LOOKRIGHT~
~k~~VEHICLE_RADIO_STATION_UP~
~k~~VEHICLE_RADIO_STATION_DOWN~
~k~~CONVERSATION_NO~
~k~~CONVERSATION_YES~
~k~~CAMERA_CHANGE_VIEW_ALL_SITUATIONS~
~k~~VEHICLE_BRAKE~
~k~~VEHICLE_ENTER_EXIT~
~k~~VEHICLE_ACCELERATE~
~k~~VEHICLE_FIREWEAPON~
~k~~VEHICLE_HORN~
~k~~TOGGLE_SUBMISSIONS~
~k~~VEHICLE_LOOKBEHIND~
~k~~VEHICLE_MOUSELOOK~
Thanks to someone can post the values here.
Re: Full Keyboard Detection in SA-MP -
Y_Less - 31.08.2014
No, those are the DEFAULT mappings - you can't rely on them being those keys.
Re: Full Keyboard Detection in SA-MP -
iFarbod - 31.08.2014
Quote:
Originally Posted by Y_Less
No, those are the DEFAULT mappings - you can't rely on them being those keys.
|
Yes these are default ones. people should use this GXT Constants instead of telling people the default key. However some of these doesn't work in SA-MP tho.
Re: Full Keyboard Detection in SA-MP -
Dubya - 02.09.2014
I would use this a ton, to replace having to use dialogs. - I'd make textdraws and have the players type in the box.
Quote:
Originally Posted by Mauzen
And if you think the players couldnt remember all the key combinations, they also wouldnt remember all the single keys from the whole keyboard.
|
It's easier for people to remember a key on the keyboard than to remember a command.
Re: Full Keyboard Detection in SA-MP -
[NRG]Dark - 02.09.2014
Key Detection could be useful for detecting cheaters

(F12-ON/OFF, Insert - God mode, and more)
Re: Full Keyboard Detection in SA-MP -
Pottus - 02.09.2014
Time for Imagination Day!
Keep dreaming.
Re: Full Keyboard Detection in SA-MP -
IceCube! - 02.09.2014
Quote:
Originally Posted by Pottus
|
Why on earth do I recognise that... It looks old and shitty... and I'm not that old xD. No offence, I'll google the date now.
Started in 1971, final episode in 1993. I likey did see it then in a rerun years later in the UK... as it ended 2 years before I was born :/. As it's origin in CANADA!
Re: Full Keyboard Detection in SA-MP -
Pottus - 02.09.2014
Quote:
Originally Posted by IceCube!
Why on earth do I recognise that... It looks old and shitty... and I'm not that old xD. No offence, I'll google the date now.
|
Probably saw it when you were 3 years old

for some reason every time I see people talking about key mapping in SAMP that song gets stuck in my head lol
Re: Full Keyboard Detection in SA-MP -
IceCube! - 02.09.2014
Quote:
Originally Posted by Pottus
Probably saw it when you were 3 years old  for some reason every time I see people talking about key mapping in SAMP that song gets stuck in my head lol
|
Haha, it's origin is in a different country. It also ended before I was born (I edited my post above). I don't know where or why I would have seen it but it looks familiar xD.
I have no idea why key mapping would make you recall that particular program tho xD.