: |
Store(&MnemonicLayout) '1' c Make keyboard independent of user's keyboard layout.
Begin Unicode > Use(GiM) Group(GiM) Using Keys c Initiate TPA Grapheme Input mode. If, and only if, at the beginning of a line. nul + $GrahemeKey > $TPAcursor Set(TPAgraphemeInputFlag='Yes') c Close the TPA Grapheme Input mode. c Clean up the text; delete the TPA Glue & TPA Cursor and reset the grapheme input flag. $TPAcursor + [K_UP] > [K_BKSP] [K_UP] Set(TPAgraphemeInputFlag='No') $TPAcursor + [K_ESC] > [K_BKSP] [K_ESC] Set(TPAgraphemeInputFlag='No') $TPAcursor + [K_TAB] > [K_BKSP] [K_TAB] Set(TPAgraphemeInputFlag='No') $TPAcursor + [K_DOWN] > [K_BKSP] [K_DOWN] Set(TPAgraphemeInputFlag='No') $TPAcursor + [K_RIGHT] > [K_BKSP] [K_RIGHT] Set(TPAgraphemeInputFlag='No') c Backspace for editing entered graphemes. Delete TPA Cursor, TPA Glue, Grapheme and replace TPA Cursor. $TPAcursor + [K_BKSP] > [K_BKSP] [K_BKSP] $TPAcursor Store(LatinLetter) "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" Store(LatinLetterLC) "abcdefghijklmnopqrstuvwxyz" Store(LatinLetterUC) "ABCDEFGHIJKLMNOPQRSTUVWXYZ" Store(Numbers) '0123456789' Store(Symbols) "'" ' !"£$%^&*()-_=+[{]};:@#~,/?`¬\|' Store(AltGrs) 'áéíóúÁÉÍÓÚ€¦' Store(CursorKeys) [K_UP] [K_DOWN] [K_LEFT] [K_RIGHT] [K_HOME] [K_END] [K_PGUP] [K_PGDN] [K_KP5] Store(NumberPad) [K_NP0] [K_NP1] [K_NP2] [K_NP3] [K_NP4] [K_NP5] [K_NP6] [K_NP7] [K_NP8] [K_NP9] [K_NPDOT] [K_NPSTAR] [K_NPSLASH] [K_NPPLUS] [K_NPMINUS] Store(FunctionKeys) [K_F1] [K_F2] [K_F3] [K_F4] [K_F5] [K_F6] [K_F7] [K_F8] [K_F9] [K_F10] [K_F11] [K_F12] Store(Specials) [K_BKSP] [K_DEL] [K_ENTER] [K_ESC] [K_INS] [K_oE2] [K_SPACE] [K_TAB] [K_SEL] [K_PRINT] [K_EXEC] [K_HELP] [K_?05] [K_NPENTER] Store(Punctuations) [K_BKQUOTE] [K_COLON] [K_COMMA] [K_HYPHEN] [K_LBRKT] [K_PERIOD] [K_QUOTE] [K_RBRKT] [K_BKSLASH] [K_SLASH] [K_EQUAL] Store(WholeKeyboard) Outs(Numbers) Outs(Symbols) Outs(AltGrs) Outs(CursorKeys) Outs(NumberPad) Outs(FunctionKeys) Outs(Specials) Outs(Punctuations) c Inhibit some keys from functioning. $TPAcursor + Any(WholeKeyboard) > $TPAcursor $TPAcursor + Any(LatinLetterUC) > $TPAcursor c If Grapheme Input Mode is in force pass processing to the GraphemeInput group. If(TPAgraphemeInputFlag = 'Yes') + Any(LatinLetter) > Use(GraphemeInput) c TPA Grapeme Input Mode not requested nor running. Nomatch > Use(MenuHandler) |
However, my real question is this, surly there must me a simpler/better way to limit a vast range of keys. How about?
: |
$TPAcursor + NotAny(LatinLetterLC) > $TPAcursor |
But Notany cannot be in the Key part of the Rule. I have tried calling a Context Only group, but I could not get it to work.
By this point in the code
: |
c Inhibit some keys from functioning.
$TPAcursor + Any(WholeKeyboard) > $TPAcursor $TPAcursor + Any(LatinLetterUC) > $TPAcursor |
Regards
Julian Griffin