Guest User

Function key triple map

a guest
Apr 1st, 2022
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;Function key triple map
  2. ;====================
  3. ;Single press retains function
  4. ;Double press = Shift + Function Key
  5. ;Long press (+1 Second) = Ctrl + Function Key
  6. SetBatchLines, -1
  7. #NoEnv
  8. SendMode Input
  9.  
  10. $F1::
  11. $F2::
  12. $F3::
  13. $F4::
  14. $F5::
  15. $F6::
  16. $F7::
  17. $F8::
  18. $F9::
  19. $F10::
  20. $F11::
  21. $F12::
  22.     key := SubStr(A_ThisHotkey, 2, 2)
  23.     KeyWait, %key%, T1
  24.     If ErrorLevel {
  25.         Send, ^{%key%}
  26.     } Else {
  27.         KeyWait, %Key%, D T0.1
  28.         If ErrorLevel {
  29.             Send, {%Key%}
  30.         } Else {
  31.             Send, +{%Key%}
  32.         }
  33.     }
  34.     KeyWait, %Key%
  35. Return
Advertisement
Add Comment
Please, Sign In to add comment