I have posted not so long ago a problem with my code. Original post link: viewtopic.php?f=76&t=109473&p=486820#p486820
I have received a proper answer, but in the process of utilizing the script new issue came up.The problem:Basically, what I need to do is to use keys (i, k, j, l) as cursor keys when pressed 1 key firstCode: Select all
F1::Suspend 1 & j::left 1 & k::down 1 & l::right 1 & i::up
For example: 1 + j will result in left key.
But the problem with the code is that when I just wanna use 1 key for its native purpose (to type 1) it is disabled.
So, I need:
When pressed "1" key and released type "1"
When pressed "1" key and without releasing other key from the list is pressed (i, k, j, l), then use it as a cursor purpose key
New working code with an issue:
Code: Select all
1 & j::left
1 & k::down
1 & l::right
1 & i::up
1::Send {1}
Let's just say I wanna type a number 10. Normally when you do that there is no problem, because the process looks like as follows:
1. Press 1 key
2. Release 1 key
3. Press 0 key
4. Release 0 key
But when you press those keys quickly the process may look like this:
1. Press 1 key
2. Press 0 key
3. Release 1 key
4. Release 0 key
And because of that usually instead of number 10 I type just a 0 (It is not a local problem just with number 10, anything typed in pair with "1" key is usually ends up without "1": typed 1* => get *)
It is understandable from the code why this happens.
To solve this problem I may hardcode all possible combinations of keys with key "1". But what happens when I press 3 keys simultaneously. Hardcode all combinations of two keys pressed with key "1"?
I am sure that there is a simple solution and I would be grateful to see it.