Live data from Hacker News

Show HN: Vim-Like Layer for Xorg and Wayland

cedaei.com

11–20 of 64 posts

Re: Show HN: Vim-Like Layer for Xorg and Wayland

#11
post #9
post #3

I've done a similar thing at the hardware level using a QMK layer. The main benefit for me is being able to use VIM movement keys in every text input. As I'm using a dual boot setup, it's also pretty handy to have the mapping directly embedded in the keyboard firmware.

Thanks for mentioning QMK [0], it's not something I've heard of before, and it seems like a huge step up from standard keyboard firmware. As far as I can tell only a small number of manufacturers officially support it, but at least one person seems to have made some progress getting a standard cooler master keyboard to run it [1]. [0] https://qmk.fm/ [1] https://github.com/qmk/qmk_firmware/tree/master/keyboards/bp...

It’s reasonably simple to port QMK (at least partially) to a new microcontroller.

I have worked on Teensy 3.6 support for QMK, and plan to work on Teensy 4.x support as well.

Re: Show HN: Vim-Like Layer for Xorg and Wayland

#12
post #11
post #9

Earlier quoted context omitted.

Thanks for mentioning QMK [0], it's not something I've heard of before, and it seems like a huge step up from standard keyboard firmware. As far as I can tell only a small number of manufacturers officially support it, but at least one person seems to have made some progress getting a standard cooler master keyboard to run it [1]. [0] https://qmk.fm/ [1] https://github.com/qmk/qmk_firmware/tree/master/keyboards/bp...

It’s reasonably simple to port QMK (at least partially) to a new microcontroller. I have worked on Teensy 3.6 support for QMK, and plan to work on Teensy 4.x support as well.

Is any special hardware needed, or is it all software work?

Re: Show HN: Vim-Like Layer for Xorg and Wayland

#13
post #4

Earlier quoted context omitted.

> e.g. keep Ctrl-D as page down. I tried doing the same using xdotool by binding Ctrl+F to PageDown but for some reason it didn't work for some reason and I didn't investigate enough.

I believe a possible reason is that the OP used xkb, which if I'm not mistaken is lower level than xdotool (so xdotool would not suffice)

I am the OP. What I tried was something along these lines.

e.g. to get w in normal mode to send Ctrl+right, I did the following.

1. Bind w to F14 in normal mode.

2. In i3 config, add `bindsym 0xffcb exec xdotool key ctrl+Right`

If I simply ran the command (`xdotool key ctrl+Right`) in normal mode, it would work but it didn't work via a binding.

This was infact the initial idea behind all this but after quite some testing xdotool turned out to be unreliable so I repurposed it as a shortcut layer.

Re: Show HN: Vim-Like Layer for Xorg and Wayland

#14
post #6

I just had a crazy idea based on this- (it's not going to be useful as is, mostly novel and potentially good) You know how a desktop screen is fixed width and windows cannot be outside of the screen (at least in tiling), I want a single workspace for all windows, where they arrange non-ovrlappingly and screen would just be a view to a fixed point so I can scroll (quickly using hjkl) in 4 directions to look at other w…

Sounds a bit like the infamous 10/GUI

http://10gui.com/video/

Re: Show HN: Vim-Like Layer for Xorg and Wayland

#15
post #12
post #11

Earlier quoted context omitted.

It’s reasonably simple to port QMK (at least partially) to a new microcontroller. I have worked on Teensy 3.6 support for QMK, and plan to work on Teensy 4.x support as well.

Is any special hardware needed, or is it all software work?

It's more like full-hardware-no-software work.

Basically if you want to use this on your "standard" keyboards bought off the shelf, you have to either:

1. Open your keyboard, replace the keyboard controller with something that you can program via soldering etc.

or 2. Pray your keyboard doesn't use a mask ROM to store its firmware, and it has a powerful enough MCU as keyboard controller, then figure out how to reflash it and port QMK to it blindly.

Re: Show HN: Vim-Like Layer for Xorg and Wayland

#16
post #6

I just had a crazy idea based on this- (it's not going to be useful as is, mostly novel and potentially good) You know how a desktop screen is fixed width and windows cannot be outside of the screen (at least in tiling), I want a single workspace for all windows, where they arrange non-ovrlappingly and screen would just be a view to a fixed point so I can scroll (quickly using hjkl) in 4 directions to look at other w…

Somewhat related: https://github.com/SimulaVR/Simula. This is the same concept but with VR.

Re: Show HN: Vim-Like Layer for Xorg and Wayland

#17
post #9
post #3

I've done a similar thing at the hardware level using a QMK layer. The main benefit for me is being able to use VIM movement keys in every text input. As I'm using a dual boot setup, it's also pretty handy to have the mapping directly embedded in the keyboard firmware.

Thanks for mentioning QMK [0], it's not something I've heard of before, and it seems like a huge step up from standard keyboard firmware. As far as I can tell only a small number of manufacturers officially support it, but at least one person seems to have made some progress getting a standard cooler master keyboard to run it [1]. [0] https://qmk.fm/ [1] https://github.com/qmk/qmk_firmware/tree/master/keyboards/bp...

Hasu usb-usb converter will let you use nearly any keyboard with qmk.

https://www.1upkeyboards.com/shop/controllers/usb-to-usb-con...

https://geekhack.org/index.php?topic=69169.0

Re: Show HN: Vim-Like Layer for Xorg and Wayland

#18
I am also using a custom keyboard layout (basically the movement layer from the NEO layout + left alt → left ctrl, right alt → left alt, caps lock → esc). Initially it was implemented as xmodmap, then as xkb layout and finally as C program using Interception Tools [0]. I had problems with both xmodmap and xkb where it wouldn't work in certain applications; Interception tools works everywhere (even in VMs and outside of X/Wayland).

[0]: https://gitlab.com/interception/linux/tools/blob/master/READ...

Re: Show HN: Vim-Like Layer for Xorg and Wayland

#19
post #3

I've done a similar thing at the hardware level using a QMK layer. The main benefit for me is being able to use VIM movement keys in every text input. As I'm using a dual boot setup, it's also pretty handy to have the mapping directly embedded in the keyboard firmware.

Was thinking that the whole time I was reading this! I actually have my layout optimized for i3/Vim-controls and it's the default for GergoPlex. I used to use xmodmap hacks but I got sick of maintaining changes across/OS's, having it on the keyboard makes it so much easier. Only downside is carrying around a QMK keyboard!

Layout: https://1.bp.blogspot.com/-rRS_TOYuIQQ/XhRERox3moI/AAAAAAABE...

GergoPlex: https://www.gboards.ca/product/gergoplex

Re: Show HN: Vim-Like Layer for Xorg and Wayland

#20
post #17
post #9

Earlier quoted context omitted.

Thanks for mentioning QMK [0], it's not something I've heard of before, and it seems like a huge step up from standard keyboard firmware. As far as I can tell only a small number of manufacturers officially support it, but at least one person seems to have made some progress getting a standard cooler master keyboard to run it [1]. [0] https://qmk.fm/ [1] https://github.com/qmk/qmk_firmware/tree/master/keyboards/bp...

Hasu usb-usb converter will let you use nearly any keyboard with qmk. https://www.1upkeyboards.com/shop/controllers/usb-to-usb-con... https://geekhack.org/index.php?topic=69169.0

That's quite helpful, thank you. The Arduino option also seems to be a useful alternative.
Post reply on HN