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

Move SuperDuper mode to Karabiner-elements #61

Merged
merged 3 commits into from
Dec 7, 2019

Conversation

narze
Copy link
Contributor

@narze narze commented Nov 26, 2019

Closes #60, and maybe #40 & #59 as well

This PR adds json configuration for Karabiner-elements which enable (S)uper(D)uper mode without utilizing Hammerspoon.

The json data is a bit verbose since it was generated from Goku

The original code:

...
        {:des "S+D -> (S)uper(D)uper Mode" :rules [[{:sim [:s :d]
                                     :simo {:interrupt true
                                            :dorder :insensitive
                                            :uorder :insensitive
                                            :afterup [{:set ["superduper-mode" 0]}]}} [{:set ["superduper-mode" 1]}]]]}
        {:des "(S)uper(D)uper + H -> Left" :rules [:superduper-mode [:##h :left_arrow]]}
        {:des "(S)uper(D)uper + J -> Down" :rules [:superduper-mode [:##j :down_arrow]]}
        {:des "(S)uper(D)uper + K -> Up" :rules [:superduper-mode [:##k :up_arrow]]}
        {:des "(S)uper(D)uper + L -> Right" :rules [:superduper-mode [:##l :right_arrow]]}
        {:des "(S)uper(D)uper + A -> Option" :rules [:superduper-mode [:##a :left_option]]}
        {:des "(S)uper(D)uper + F -> Command" :rules [:superduper-mode [:##f :right_command]]}
        {:des "(S)uper(D)uper + Space -> Shift" :rules [:superduper-mode [:##spacebar :right_shift]]}
        {:des "(S)uper(D)uper + U -> First Tab" :rules [:superduper-mode [:##u :!C1]]}
        {:des "(S)uper(D)uper + I -> Prev Tab" :rules [:superduper-mode [:##i :!CSopen_bracket]]}
        {:des "(S)uper(D)uper + O -> Next Tab" :rules [:superduper-mode [:##o :!CSclose_bracket]]}
        {:des "(S)uper(D)uper + P -> Last Tab" :rules [:superduper-mode [:##p :!C9]]}
...

Pros of using this mode on KE:

  • Key binding will be near-hardware level, or it will be on physical S+D keys no matter what keyboard layout you use (I'm using Colemak.) It also applies to h,k,k,l keys as well.
  • Simultaneous threshold value can be set within KE
  • Much faster than Hammerspoon. I've been using it by myself for more than a year without issues in this mode.

Cons:

  • You cannot see "(S)uper(D)uper Mode" while pressing S+D anymore.

@jasonrudolph
Copy link
Owner

Thanks for this pull request, @narze! It may be a while before I can give this a proper review, but I look forward to trying it out. 🙇

@jasonrudolph jasonrudolph merged commit 8089bfd into jasonrudolph:master Dec 7, 2019
@jasonrudolph
Copy link
Owner

Thanks for this contribution, @narze! ⚡

This pull request was closed.
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

Successfully merging this pull request may close these issues.

Suggestions : SuperDuper mode with pure Karabiner-elements
2 participants