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

[Kanata] Add a HRM-optimized navigation layer #52

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fnuttens
Copy link
Contributor

@fnuttens fnuttens commented Oct 7, 2024

In the navigation layer, WASZXCV shortcuts are useful for some layouts, but they dramatically reduce the amount of good spots for other keys, such as tab and S-tab.

These are particularly useful with Ctrl and Alt, but their current position makes it difficult to press, say Alt-tab using home-row mods.

What if we keep extending Arsenik by adding a navigation layer built for HRM, losing the Qwerty shortcuts in the same process?

@fnuttens fnuttens marked this pull request as draft October 7, 2024 22:00
@fnuttens fnuttens mentioned this pull request Oct 7, 2024
@bouttier
Copy link
Contributor

I personally use [S] / [F] for S-tab / tab.

  • + strong finger
  • + homerow
  • + easy C-tab and C-S-tab
  • + easy M-tab (I dont know if it’s common?)

@fnuttens
Copy link
Contributor Author

fnuttens commented Oct 14, 2024

@bouttier interesting, I didn’t consider separating S-tab and tab but maybe this could work. However tab on [F] doesn’t work for me because it makes Alt-tab impossible using one hand.

easy M-tab (I dont know if it’s common?)

On Windows it opens the virtual desktops task view, so I’d say it’s pretty common if you use virtual desktops.

@fnuttens
Copy link
Contributor Author

fnuttens commented Oct 14, 2024

Here’s a table summing up each position strengths and weaknesses:

S-tab/tab position Homerow? Finger strength A-tab A-S-tab C-tab C-S-tab M-tab
[W]/[E] no 🟢 🟢 🟢 🔴* 🟢 🟢
[A]/[S] yes 🟡 🟢 🟢 🟢 🟢 🔴
[S]/[D] yes 🟢 🟢 🟢 🔴 🟢 🟢
[S]/[F] yes 🟢 🔴 🟢 🟢 🟢 🟢
[S]/[D]+[F] yes 🟢 🟢 🟢 🟢 🟢 🟢

* Uncomfortable on staggered keyboards, impossible on ortholinear ones.

@bouttier
Copy link
Contributor

Oups, I forgot about A-tab! Nice synthesis table.
And what about tab on [D] and [F]?

@fnuttens
Copy link
Contributor Author

fnuttens commented Oct 14, 2024

@bouttier tab on both [D] and [F] actually ticks all the boxes, yay! Sure, it takes a third slot but I don’t see any collision at the moment. I’ll just dogfood this position for a few days and see if I prefer this compared to [W]/[E]; thanks for your help!

Edit: OK this position is definitely my favorite so far, the C-(S-)tab movements are so comfortable that I literally use them instead of Vimium’s actions to navigate tabs!

@fnuttens fnuttens force-pushed the vimnav-hrm branch 2 times, most recently from 0ec38c2 to f5ccc7e Compare October 14, 2024 21:58

;; Replace XX by the keyboard shortcut to quit applications on your OS.
;; qut C-q ;; [Command]-[Q]
qut XX ;; do nothing
Copy link
Contributor Author

@fnuttens fnuttens Oct 14, 2024

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.

@fnuttens fnuttens changed the title wip(kanata): add HRM-optimized navigation layer [Kanata] Add a HRM-optimized navigation layer Oct 15, 2024
@fnuttens fnuttens force-pushed the vimnav-hrm branch 3 times, most recently from 8423ea0 to 6837f15 Compare October 16, 2024 20:40
@fnuttens fnuttens marked this pull request as ready for review October 16, 2024 20:41
@bouttier
Copy link
Contributor

Looks really cool! Two small remarks:

  • I think @fun and esc should be switched for more consistency with the right hand.
  • Quit shortcut make sens at this place; may be suggests Alt-F4 as a possible binding in the comment?

@fnuttens
Copy link
Contributor Author

fnuttens commented Oct 22, 2024

  • I think @fun and esc should be switched for more consistency with the right hand.

I’m afraid that’s not possible, doing so would block access to F5 on the funpad 🙁

  • Quit shortcut make sens at this place; may be suggests Alt-F4 as a possible binding in the comment?

Since the comment above explains that it’s meant to receive an OS-specific shortcut, I’m not sure why the example (because an example is just what it is) should showcase Windows instead of Linux. Maybe we could add the correct shortcut for each OS?

;; qut C-q ;; [Control]-[Q] (Linux)
;; qut M-q ;; [Command]-[Q] (macOS)
;; qut A-f4 ;; [Alt]-[F4] (Windows)

@bouttier
Copy link
Contributor

  • I think @fun and esc should be switched for more consistency with the right hand.

I’m afraid that’s not possible, doing so would block access to F5 on the funpad 🙁

Oups, I mean @pad and esc!

  • Quit shortcut make sens at this place; may be suggests Alt-F4 as a possible binding in the comment?

Since the comment above explains that it’s meant to receive an OS-specific shortcut, I’m not sure why the example (because an example is just what it is) should showcase Windows instead of Linux. Maybe we could add the correct shortcut for each OS?

;; qut C-q ;; [Control]-[Q] (Linux)
;; qut M-q ;; [Command]-[Q] (macOS)
;; qut A-f4 ;; [Alt]-[F4] (Windows)

Yes, also win, not instead, looks perfect to me like that!

@fnuttens
Copy link
Contributor Author

Yes, also win, not instead, looks perfect to me like that!

Done 🙂

Oups, I mean @pad and esc!

Wow, this is actually a pretty clever change because it plays nicely with your upcoming PR (#50).
Currently, having the numpad as a layer-while-held is only helpful for the right hand to type numbers. With @pad on [A], you can actually use the arrow keys without locking the layer, which is helpful if you need to quickly navigate something using only the left hand 🤯

Thanks again for your help @bouttier!

@fnuttens fnuttens force-pushed the vimnav-hrm branch 2 times, most recently from 2ff77d6 to 25675d9 Compare October 23, 2024 11:53
@bouttier
Copy link
Contributor

It’s really nice to have media controls on Fn layer, but I think we should have hrm on the right hand also on the Fn layer to be able to do Ctrl-Alt-Fx while the layer is locked (currently, you have to do [J]+[L]+[Space]+[:]+[W] for Ctrl-Alt-F2, not easy!).

@fnuttens
Copy link
Contributor Author

fnuttens commented Oct 25, 2024

Oops, since I don’t really use Fx keys with modifiers I overlooked this use case. Do you think it’s still a good idea to put media controls on this layer?

Maybe something like this:

;; function keys
(deflayer funpad
  XX   XX   XX   XX   XX   XX   XX   XX   XX   XX   XX
  f1   f2   f3   f4   XX        XX   vold volu mute XX
  f5   f6   f7   f8   XX        XX   lctl lalt lmet _
  f9   f10  f11  f12  XX   XX   XX   brdn bru  XX   XX
            _               _             _
)

I don’t know, with the modifiers on the right hand it’s less obvious where to put the media controls, maybe it’s best to leave that choice to the user (do like I proposed above, create a media layer, etc.).

Edit: in the end I removed media controls because they are out of this PR’s scope. I still believe this feature would be a great addition to Arsenik, but it has to be well thought out in a dedicated PR/issue.

@fnuttens fnuttens force-pushed the vimnav-hrm branch 2 times, most recently from fb896ad to 0643e40 Compare October 29, 2024 14:45
## HRM friendly S-tab/tab

S-tab and tab stay on the homerow while playing nice with Ctrl and Alt mods.

## Add cross-platform quit shortcut on HRM nav layer

@qut → [Q]
- @qut allows closing apps on any OS (C-q on Linux, A-f4 on Windows, etc.), optimizing muscular memory
- it is more coherent to map @qut on [Q]

@pad → [A]
- @pad thus mirrors @fun on the right hand
- allows using the numpad’s arrow keys without locking the layer (layer-while-held)

## Map esc/del on [A]/[V]

The goal is to allow escaping and deleting using the left hand only.
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.

2 participants