Isoraqathedh

Dead keys

Jul 9th, 2014
280
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. >!\::
  2.     thisPage = -1
  3.     loop
  4.     {
  5.         thisPage := Mod(thisPage + (keyPressed = "q" ? allPages - 1 : 1), allPages)
  6.         keyLabels := "w: " . (diacriticsList[thisPage * 4 + 1] = "" ? "-" : diacriticsList[thisPage * 4 + 1])
  7.             .      "`na: " . (diacriticsList[thisPage * 4 + 2] = "" ? "-" : diacriticsList[thisPage * 4 + 2])
  8.             .      "`ns: " . (diacriticsList[thisPage * 4 + 3] = "" ? "-" : diacriticsList[thisPage * 4 + 3])
  9.             .      "`nd: " . (diacriticsList[thisPage * 4 + 4] = "" ? "-" : diacriticsList[thisPage * 4 + 4])
  10.         nil := thisPage + 1
  11.         IfWinNotExist AHK Dead Keys
  12.             SplashTextOn, 300, 200, AHK Dead Keys (Page %nil% of %allPages%), %keyLabels% `n`ne: next page`nq: last page`nx: quit`n
  13.         else {
  14.             WinSetTitle,,, AHK Dead Keys (Page %nil% of %allPages%)
  15.             ControlSetText, Static1, %keyLabels% `n`ne: next page`nq: last page`nx: quit`n
  16.         }
  17.         Input nil, , wasdeqx
  18.         nil = ; we can discard the rest
  19.         StringRight keyPressed, ErrorLevel, 1
  20.     } until not (keyPressed = "e" or keyPressed = "q")
  21.     SplashTextOff
  22.     if (keyPressed = "x" or diacriticsList[thisPage * 4 + DiacriticsOffset[keyPressed]] = "")
  23.         return
  24.     else
  25.         DeadKey(diacriticsList[thisPage * 4 + DiacriticsOffset[keyPressed]])
  26. return
Advertisement
Add Comment
Please, Sign In to add comment