Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to implement dead keys like in workman dead key layout do? #212

Open
sokinpui opened this issue Feb 27, 2023 · 0 comments
Open

How to implement dead keys like in workman dead key layout do? #212

sokinpui opened this issue Feb 27, 2023 · 0 comments

Comments

@sokinpui
Copy link

sokinpui commented Feb 27, 2023

The idea of using 'dead' keys is based on assumption that pressing 2 easy keys is better than pressing hard key. So to make it easier to type (programming) characters/symbols, we're going to press an easily reachable key (which will NOT output any character), release it and then press another easily reachable key to produce, say, @ character.

I try to implement this in goku, since I use qwerty layout, while I find my code bug, after I press period, I cannot exit the dead-mode anymore, also, the period is displayed on the screen before I press another key.
The following code try to implement that: tap period key . to enter dead-mode, then type d to display (.

{:des "dead key mode"
  :rules [
    [:period [["dead-mode" 0]] ["dead-mode" 1]]
    [:d
        [["dead-mode" 1] :!S9]
        ["dead-mode" 0]
        {:delayed {:invoked ["dead-mode" 0] :canceled ["dead-mode" 0]} :params {:delay 300}}]
    ]}

What should I improve to implement dead key?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant