mooz / xkeysnail

Yet another keyboard remapping tool for X environment
891 stars 112 forks source link

Multiple stroke keys with default action/keys? #79

Open rbreaves opened 4 years ago

rbreaves commented 4 years ago

How it works currently.

define_keymap(None, {
    K("C-x"): {
      K("C-c"): K("C-q"),
      K("C-f"): K("C-q"),
    }
})

How I want it to work, optionally. If K is blank or has the word pass, default, or action then it knows to execute an additional action.

define_keymap(None, {
    K("C-x"): {
      K(""): K("C-x"),
      K("C-c"): K("C-q"),
      K("C-f"): K("C-q"),
    }
})

Why add this? Shortcut keys related to Alt-Tab & Ctrl-Tab could be implemented better.

Example is Ctrl-(grave or tilde key) should normally activate window switching within the context of a single app in Linux and I like that functionality, but macOS also maps Cmd- after Cmd-Tab has been pressed to reverse select apps.

In general it would open up more keymapping options without collisions of functionality.

joshgoebel commented 2 years ago

I can read the configs, but I'm not certain the behavior you are expecting from the second config and your description... could you perhaps list out the sequence of keystrokes you're trying to achieve and what you want to happen at which moments?

joshgoebel commented 2 years ago

Ping.