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

Initial layer-indicator support #13

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

twadzins
Copy link

@twadzins twadzins commented Apr 4, 2024

Pointer to discord thread: https://discord.com/channels/877392805654306816/1221190895806709911

This code does the following:

  • Updates the dtsi erb to create behaviors and macros which are variants of the thumb, space and thumb_parang behaviors and associated macros that will, if enabled, send a unique modifier sequence when a layer key is pressed, and send F18 when the layer key is released. These behaviors are then applied to keymap.json in place of the current &thumb, &space and &thumb_parang custom mappings. The functionality is enabled with a flag USE_LAYER_INDICATORS, which is disabled by default
  • Adds to the rake build: Create a BetterTouchTool preset that displays an overlay of the active keyboard layer. This preset building uses the unique key sequences sends by the above change to the dtsi

twadzinski added 3 commits April 3, 2024 19:09
…ring in between modifier keys. This was causing things like "cursor layer then right arrow" to sometime have a modifier applied to the right arrow, since the macro apparently doesn't finish before the arrow key is sent.
…it is disables the indicator functionality it runs identical to the old behavior
@sunaku sunaku added the enhancement New feature or request label Apr 8, 2024
@sunaku
Copy link
Owner

sunaku commented Apr 8, 2024

Thanks for contributing this! ️❤️ I will review it when I get some time. 🧗 In the meantime, it would be helpful to get more users from the community to help test it and provide feedback. Also, I would like to expand this to support all 3 OS'es in the future.

@sunaku sunaku force-pushed the main branch 5 times, most recently from 1e21101 to feb618f Compare September 16, 2024 17:04
@sunaku sunaku force-pushed the main branch 15 times, most recently from 18ad3c8 to 47ea40e Compare October 7, 2024 15:49
@sunaku
Copy link
Owner

sunaku commented Oct 9, 2024

Hey @twadzins, I've updated this patch to the latest v38 release and did some minor additional refactoring in my branch: https://github.com/sunaku/glove80-keymaps/tree/layer-indicator

Would it be possible to bundle the layer map diagrams into the ZIP file for offline usage? Currently the preset appears to load them from GitHub, which requires an internet connection.

@buzz
Copy link

buzz commented Nov 23, 2024

This is exactly what I've been looking for. 👍

Regarding extending this to Linux: sxhkd might not be a good choice. It only runs under X11, no Wayland support.

For Wayland this is more complicated as Wayland's security model doesn't allow this. On Wayland the compositor would need to support this. So, one needs separate solutions for each Desktop Environment.

Another way of doing this would be to run a tiny daemon that acts lower level (evdev?) that is before key strokes even reach the display manager. This way, it works on both Wayland and X11.

Some input remapping tools do it this way. I couldn't find one that allows running arbitrary commands though...

So maybe one could write a tiny daemon that reacts to those key presses and sends events through DBus to a desktop client.

Starting points:

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

Successfully merging this pull request may close these issues.

3 participants