News for hackers. Stuff that matters.
Re:Show HN: Vim-Like Layer for Xorg and Wayland by dlkmp on Thursday August 27, 2020 @02:39AM (#24290717)
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.

Re:Show HN: Vim-Like Layer for Xorg and Wayland by SuperPaintMan on Thursday August 27, 2020 @03:55AM (#24291117)
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 by l_t on Thursday August 27, 2020 @12:50PM (#24295600)
I recently got a GergoPlex and it's so fun to be able to actually reprogram the keyboard itself.

In fact, I got so addicted to keybindings that I tweaked the chording engine to make chords QMK-layer-dependent. The ability to do "modal chords" is just great.

Anyway, thank you for making these things -- I may never have heard of QMK if it wasn't for your boards!

Re:Show HN: Vim-Like Layer for Xorg and Wayland by 1MachineElf on Thursday August 27, 2020 @02:02PM (#24296596)
Modal chords sound interesting. Would you mind linking to your keymap / QMK fork?
Re:Show HN: Vim-Like Layer for Xorg and Wayland by l_t on Thursday August 27, 2020 @05:16PM (#24298770)
Sure! I don't have the GergoPlex keymap on Github yet (still a WIP, that one...) but I used the modal chords concept in my Faunchpad keymap as well. Here's the .def file with "modal chords" in it (the first parameter is the layer aka mode, then the rest are the usual ones.)

https://github.com/luketurner/qmk_firmware/blob/master/keybo...

The forked engine (with very minimal changes) that's used in that keymap is here:

https://github.com/luketurner/qmk_firmware/tree/master/keybo...

The only change is that all the chording macros (PRES, KEYS, etc.) accept a QMK layer number as the first parameter, and will only activate when that layer is active. The end result is similar to the "sticky bits" functionality, but without the side-effect of masking the signal of those bits.

This is my first foray into embedded programming stuff, so I can't promise I didn't do anything dumb in there. It seems to work for me, though!

Re:Show HN: Vim-Like Layer for Xorg and Wayland by Legogris on Thursday August 27, 2020 @05:59AM (#24291917)
Just curious, how much time would you say it took you to 1) build and make it, 2) get used to the layout?
Re:Show HN: Vim-Like Layer for Xorg and Wayland by linsomniac on Thursday August 27, 2020 @09:48AM (#24293633)
I made the transition from a Thinkpad keyboard to an ErgoDox 3-ish years ago. For me I'd say it took about 2 weeks to be fully back to normal with it, and about a week to stop feeling like I couldn't type.

In my case, I had some bad habits I was needing or wanting to get rid of at the same time: I typed "b" with the wrong finger, I always used my right pinky for shift, I always looked when typing numbers so I never really got to touch-typing them, sometimes I would also peek for regular letters or keys, just to make sure I was where I thought I was.

If you have fewer bad habits, it might take less time. If you have more... :-)

Re:Show HN: Vim-Like Layer for Xorg and Wayland by SuperPaintMan on Thursday August 27, 2020 @06:55AM (#24292317)
>build and make it

Depends on how you define 'build' here, I'm assuming you mean come to what would become the final design for GergoPlex. That took about a year and a half, my first two designs (Gergo and Georgi respectively) sought to improve on my issues with the ErgoDox (mostly size, PCB-forehead, height, thumb-cluster). After a year of using Gergo and diving into QMK and a failed attempt at picking up stenography, I came up with the idea for a more chord-orientated layout. It didn't take long to get working hardware (as it was a reduction of an existing design), but the layout took about two weeks before everything had settled into it's final place. I did a bit of a write-up over on the blog of how I ended up dailying GergoPlex from a full size 104 [1] and the slow descent into preprocessor madness [2] to make the Combo decorators work. The weird part was tuning QMK so combos like 'we' wouldn't misfire while typing and analyzing my Vim usage to find comfortable places for frequently used chords. (Such as JK for :, WE or UI for Esc, NM for Enter, XC for -, M< for _, etc)

>get used to the layout

At every transitional step I'd say maybe a week? The harder part was finding a keymap that worked for me. But I started with a Sun-Style layout on the ErgoDox and slowly adpated it as I moved to smaller boards. Control is on 'A' (and ';') on GergoPlex for that reason, and the symbols layers are fairly similar. Honestly, just using it in a active chat server for a few hours was enough to get me 90% of the way there.

Every users needs are going to be different, and their layout should match that (it's _why_ you get a programmable keyboard after all!). How you get there is a fiddly endeavour involving lots of flashing and tweaking, but you end up with something ergonomic and deeply personal!

[1] https://blog.gboards.ca/2020/01/weird-keyboards-programmable...

[2] https://blog.gboards.ca/2020/02/adventures-in-obscure-c-feat...

Re:Show HN: Vim-Like Layer for Xorg and Wayland by Legogris on Thursday August 27, 2020 @07:47AM (#24292686)
Oh wow, I thought you were replicating it off of the site, not the actual designer of it! That's awesome, I've seen it before and been curious to try to make it myself. Helix keyboard is pretty popular here (Japan) but never tried it more than brushing them (pre-COVID lol) in the mech specialty shop in Akihabara.

I'll definitely make the plunge at some point, just gauging expectations on how roughly much I should expect to invest time-wise before :)

Thank you for your work, I think it's hard to appreciate the contribution things like the ergodex is making for moving towards chorded and other more suitable text input interface for computers. Especially as we transition to VR.

Re:Show HN: Vim-Like Layer for Xorg and Wayland by SuperPaintMan on Thursday August 27, 2020 @08:47AM (#24293106)
Skip on the Helix and grab something like the Crkbd (Make sure it's a model where the outer column can snap off) or the MiniAxe, Yushakobo carries both I believe. Also check out the 'Self Made Keyboards In Japan' Discord server as there are tons of boards available to you domestically via booth! Worst case, Yushakobo should have everything you need to get a build done (and even has a wonderful selection of blank keycaps), go hit their workshop! :)

No worries, we spend all day using these devices, the fact that we're not using them in a highly configurable fashion pains me. Make technology work for you, not the other way around

Re:Show HN: Vim-Like Layer for Xorg and Wayland by Legogris on Thursday August 27, 2020 @09:19AM (#24293376)
Wow, the MiniAxe LP looks exactly like what I think I want (despite the Crkbd being much more aesthetic IMO). I realized over 1y+ on a brown-switch mech that despite loving the layout, I'm just struggling typing properly in a way I don't on a normal Thinkpad laptop chiclet. Just really hard to figure out how switches actually feel IRL even when trying a switch tester.

Had completely missed it, thanks for the pointer :)

Re:Show HN: Vim-Like Layer for Xorg and Wayland by Ianvdl on Thursday August 27, 2020 @03:18AM (#24290922)
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...

Re:Show HN: Vim-Like Layer for Xorg and Wayland by least on Thursday August 27, 2020 @03:50AM (#24291092)
Re:Show HN: Vim-Like Layer for Xorg and Wayland by Ianvdl on Thursday August 27, 2020 @04:09AM (#24291192)
That's quite helpful, thank you. The Arduino option also seems to be a useful alternative.
Re:Show HN: Vim-Like Layer for Xorg and Wayland by secure on Thursday August 27, 2020 @03:27AM (#24290975)
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 by Coolsies on Tuesday September 01, 2020 @10:15AM (#24341919)
I'm sorry to barge in,but I am in dire need of what you are working on. Could you share your progress or material, Sir?
Re:Show HN: Vim-Like Layer for Xorg and Wayland by Ianvdl on Thursday August 27, 2020 @03:33AM (#24290998)
Is any special hardware needed, or is it all software work?
Re:Show HN: Vim-Like Layer for Xorg and Wayland by rfoo on Thursday August 27, 2020 @03:41AM (#24291032)
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 by samatman on Thursday August 27, 2020 @04:40AM (#24291374)
Drop (née Massdrop) makes a number of fairly 'normal' QMK keyboards. From smallest to largest, the Alt, Ctrl, and Shift.

Then there's Ergodox EZ, a company which makes the eponymous ortholinear split key (my daily driver), as well as a 40% keyboard called the Planck, and a new next-gen ergo keyboard called the Moonlander. These are designed from the get go to use layers, where each layer assigns its own meaning to keys, and that's where QMK gets really powerful.

There's a whole ecosystem of kits and group buys if you're looking to make a hobby out of it, but if you just want a keyboard you can program, these have you covered.

Re:Show HN: Vim-Like Layer for Xorg and Wayland by dlkmp on Thursday August 27, 2020 @06:16AM (#24292047)
For people based in Europe who might be interested in an Ergodox or similar, I can recommend a visit to falba.tech.

I've ordered two Redox from them by now (for work & home) and am very satisfied with the product so far.

Re:Show HN: Vim-Like Layer for Xorg and Wayland by simias on Thursday August 27, 2020 @11:14AM (#24294466)
I did the same thing on my Ergodox with QMK, only with emacs/readline bindings. control-M for enter, control-A for beginning of line, control-E for end of line, control-N for next line, control-H for backspace etc...

It makes using those clunky web edit boxes (such as the one I'm typing this into right now) somewhat bearable.

Getting a fancy ergonomic programmable keyboards is one of the best decisions I've made over the past few years. It's so much more comfortable in the long run.

I'm also a big fan of "space cadet shift", which makes left and right shift input ( and ) when pressed on their own. I also have a dual-function caps lock: when pressed on its own it's Escape, when chorded with an other key it's control. You can do that in software with xcape for those who want to give it a try:

    xcape -t 500 -e 'Shift_L=parenleft;Shift_R=parenright;Control_L=Escape'
You'll have to swap left control and caps lock using xmodmap or setxkbmap as well.

And for those who are curious to see what a QMK config looks like, it's fairly straightforward (this one is a WIP, there are a few problems with it, but it gives you an idea):

https://github.com/simias/qmk_firmware/blob/372b71ca90df01b5...

That's of course assuming that your board is already supported, adding support for a new board is a bit trickier and requires some embedded C know-how.

Re:Show HN: Vim-Like Layer for Xorg and Wayland by ohazi on Thursday August 27, 2020 @01:03PM (#24295753)
What are your thoughts on the vertical stagger on ergonomics, vs. just having the left and right side split? Does it actually help, or is it more of an aesthetic choice?

I notice carpal tunnel pain in my wrists when I tension or release the tendons in my wrist that curl my fingers to move them up and down. Moving them from side to side doesn't hurt at all, so I'm skeptical that there's anything ergonomically wrong with the normal staggered layout. Split still seems like a good idea, though.

How infuriating are regular keyboards after getting used to Ergodox?

Re:Show HN: Vim-Like Layer for Xorg and Wayland by Legogris on Thursday August 27, 2020 @05:57AM (#24291902)
What I did here was starting to use a premade programmable 60% keyboard (Vortexgear Pok3r) and remapping "Caps-Lock" as modifier to make hjkl into the actual arrow keys. No software config needed.
Re:Show HN: Vim-Like Layer for Xorg and Wayland by cassepipe on Thursday August 27, 2020 @04:38AM (#24291365)
Would you write about it? I am really curious.
Re:Show HN: Vim-Like Layer for Xorg and Wayland by modalkb on Thursday August 27, 2020 @03:12AM (#24290876)
Care to share please?