-
Notifications
You must be signed in to change notification settings - Fork 17
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
[Kanata] Add a HRM-optimized navigation layer #52
Open
fnuttens
wants to merge
1
commit into
OneDeadKey:main
Choose a base branch
from
fnuttens:vimnav-hrm
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
;; Vim-Navigation layer (optimized for home-row mods): | ||
;; - right: Vim-like arrows on HJKL, home/end page up/down, mouse scroll | ||
;; - left: Tab/Shift-Tab, prev/next, quit, esc, del | ||
;; - top: Super-num (i3/sway) or Alt-num (browser), zoom in/out | ||
|
||
;; The `lrld` action stands for "live reload". This will re-parse everything | ||
;; except for linux-dev, i.e. you cannot live reload and switch keyboard devices. | ||
|
||
(deflayer navigation | ||
M-1 M-2 M-3 M-4 M-5 lrld M-6 M-7 M-8 M-9 M-0 | ||
@qut esc bck fwd XX home pgdn pgup end @run | ||
@pad S-tab tab tab XX lft down up rght @fun | ||
XX XX XX del XX _ @mwl @mwd @mwu @mwr XX | ||
del _ esc | ||
) | ||
|
||
;; NumPad | ||
(deflayer numpad | ||
_ _ _ _ _ _ _ _ _ _ _ | ||
XX home up end pgup @/ @7 @8 @9 XX | ||
XX lft down rght pgdn @- @4 @5 @6 @0 | ||
XX XX XX XX XX _ @, @1 @2 @3 @. | ||
@std @nbs @std | ||
) | ||
|
||
;; function keys | ||
(deflayer funpad | ||
XX XX XX XX XX XX XX XX XX XX XX | ||
f1 f2 f3 f4 XX XX XX XX XX XX | ||
f5 f6 f7 f8 XX XX lctl lalt lmet _ | ||
f9 f10 f11 f12 XX XX XX XX XX XX XX | ||
_ _ _ | ||
) | ||
|
||
(defalias | ||
std (layer-switch base) | ||
pad (layer-switch numpad) | ||
|
||
fun (layer-while-held funpad) | ||
|
||
;; Choose the quit shortcut according to your OS. | ||
;; qut C-q ;; [Control]-[Q] (Linux) | ||
;; qut M-q ;; [Command]-[Q] (macOS) | ||
;; qut A-f4 ;; [Alt]-[F4] (Windows) | ||
qut XX ;; do nothing | ||
|
||
;; Mouse wheel emulation | ||
mwu (mwheel-up 50 120) | ||
mwd (mwheel-down 50 120) | ||
mwl (mwheel-left 50 120) | ||
mwr (mwheel-right 50 120) | ||
) | ||
|
||
;; vim: set ft=lisp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m convinced this action is relevant but I’m not sure it is discoverable enough, being hidden in this file… On the other hand, making it appear in the root config file (like the
@run
action) would be confusing because it’s only supported here.