Replies: 1 comment
-
I forgot to link to enhancement request #4117 which could be one way to handle this. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Many European layouts use dead keys where the key does not generate a complete character by itself, but acts in combination with the following key-press.
For example, on the US international layout, pressing circumflex
^
followed bya
givesâ
. And wikipedia tells me following it with a space typically gives the dead key's normal character alone.Now, I want to do something like that but different. I want the first press to give the base character, but be primed for something to trigger on the second key, or revert to normal after a timeout or if the second key is not on the trigger list. This is an "undead" key in the sense I want something to happen immediately without the traditional dead key's waiting state - a zombie key if you like.
I'm going to use the following toy example with the Zombie theme (but I have a real use-case in mind for Japanese layouts with modifier keys).
z
key.If you press a zombie key you get its letter as normal (here
z
) but the system is primed ("infected") for half a second. If while "infected" you press a "Release Key" (herem
), this triggers a special rule action - sending the backspace key (to remove the initial zombie keyz
), followed by sending the unicode sequence for 🧟 (in hex mode) or send "!ZOMBIE!" (when I can't send the emoji).The real use-case is to replace a base character with a modified version (the three modifications I have in mind are for Japanese, dakuten or ten-ten like か→が, handakuten or maru like は→ぱ, or small forms like あ→ぁ).
The example as shown works BUT if the timeout is too long or you type too fast there is a window for a false trigger - for example
z
,o
,m
triggers if typed quickly. Is there an easy way to ensure other keys (likeo
here) clear the variable immediately - short of adding a rule to all of them (as done for the spacebar here)?We can't use
to_delayed_action.to_if_canceled
as that will trigger on any following key including the release keym
breaking the example.Beta Was this translation helpful? Give feedback.
All reactions