Full Keyboard Detection in SA-MP
#1

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.
Reply
#2

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.
Reply
#3

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.
Reply
#4

It will never happen we got what we got adapt to it.
Reply
#5

No! I don't want my privacy invaded SAMP doesn't need to log every key.
Reply
#6

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.
Reply
#7

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.
Reply
#8

Quote:
Originally Posted by Mauzen
View Post
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.
Reply
#9

Quote:
Originally Posted by Rifa4life
View Post
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
Reply
#10

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
Reply
#11

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".
Reply
#12

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~
Code:
LEFT
~k~~GO_RIGHT~
Code:
RIGHT
~k~~GO_FORWARD~
Code:
UP
~k~~GO_BACK~
Code:
DOWN
~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~
Code:
TAB
~k~~PED_FIREWEAPON_ALT~
Code:
\
~k~~PED_CYCLE_WEAPON_LEFT~
Code:
MS WHEEL UP
~k~~PED_SNIPER_ZOOM_IN~
Code:
MS WHEEL UP
~k~~PED_LOCK_TARGET~
Code:
RMB
~k~~PED_CYCLE_WEAPON_RIGHT~
Code:
MS WHEEL DOWN
~k~~PED_SNIPER_ZOOM_OUT~
Code:
MS WHEEL DOWN
~k~~GROUP_CONTROL_FWD~
Code:
G
~k~~GROUP_CONTROL_BWD~
Code:
H
~k~~CONVERSATION_NO~
Code:
N
~k~~CONVERSATION_YES~
Code:
Y
~k~~CAMERA_CHANGE_VIEW_ALL_SITUATIONS~
Code:
V
~k~~PED_JUMPING~
Code:
LSHIFT
~k~~VEHICLE_ENTER_EXIT~
Code:
RETURN
~k~~PED_SPRINT~
Code:
SPACE
~k~~PED_FIREWEAPON~
Code:
LMB
~k~~PED_DUCK~
Code:
C
~k~~PED_LOOKBEHIND~
Code:
MMB
~k~~SNEAK_ABOUT~
Code:
LALT
~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~
Code:
N
~k~~CONVERSATION_YES~
Code:
Y
~k~~CAMERA_CHANGE_VIEW_ALL_SITUATIONS~
Code:
V
~k~~VEHICLE_BRAKE~
Code:
S
~k~~VEHICLE_ENTER_EXIT~
Code:
RETURN
~k~~VEHICLE_ACCELERATE~
Code:
W
~k~~VEHICLE_FIREWEAPON~
Code:
MS WHEEL DOWN
~k~~VEHICLE_HORN~
Code:
CAPSLOCK
~k~~TOGGLE_SUBMISSIONS~
Code:
2
~k~~VEHICLE_LOOKBEHIND~
Code:
MMB
~k~~VEHICLE_MOUSELOOK~
Code:
RMB
Thanks to someone can post the values here.
Reply
#13

No, those are the DEFAULT mappings - you can't rely on them being those keys.
Reply
#14

Quote:
Originally Posted by Y_Less
View Post
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.
Reply
#15

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
View Post
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.
Reply
#16

Key Detection could be useful for detecting cheaters (F12-ON/OFF, Insert - God mode, and more)
Reply
#17

Time for Imagination Day!

Keep dreaming.
Reply
#18

Quote:
Originally Posted by Pottus
View Post
Time for Imagination Day!

http://www.youtube.com/watch?v=pexVTVMkt8c

Keep dreaming.
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!
Reply
#19

Quote:
Originally Posted by IceCube!
View Post
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
Reply
#20

Quote:
Originally Posted by Pottus
View Post
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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)