Background : For the past five years I have been using Mac hardware (most MacBook Pro laptops for the most part) and software after many years of using Gnu / Linux on a regular PC with ergonomic keyboards. More importantly, as a heavy Emacs user, switching to a Mac was painful, and Apple's standard short keyboard was crazy and inevitable. I prevented RSI using the Karabiner tool for making two small but very important changes: 1) changing the “cap” key to generate the menu key (f13) when pressed alone, and the key code with the control key when pressing another key; 2) change the return key in the same way, get a return when pressed alone and the key of the key with the changed key when pressed with another key. Frustrated by recent Apple hardware and software solutions, I am now returning to Gnu / Linux (Ubuntu, if that matters), but sticks with Mac laptops.
Question : since Karabiner is an OS X-only tool that does not have an available Gnu / Linux counterpart, it seems I will have to write and / or modify some code to get the caplock key and return. Carabiner allows for double behavior. Karabiner writes that xbindkeys and rbindkeys perform key remapping, but at first glance they don't seem to handle the behavior of the dual function. Now I am struggling with porting the Carabiner or creating a whole new tool. And, of course, there may be other approaches. So my question is: what programming tips would you offer to solve this problem? Especially one that can be developed in hours, days, or weeks, and not in months.
Notes
1) There are various approaches related to behavioral changes, such as switching control and command keys. Many of them were tested with varying degrees of satisfaction. The parallel approach of Karabiner is IMHO, far and far, the most effective in that it provides the symmetry of the control key on the keyboard home line and for all applications!
2) Other equipment may also be offered. I tried Dell, HP, Lenovo, Acer computers and looked a lot more. None of them are comparable to the combined power, size, feel and style of the best Apple products, albeit at a high price. For example, the Dell Precision 7510 is bulky and has a trackpad that looks like sandpaper; Lenovo X1 (a very good system) does not have a Thunderbolt port; and etc.
3) External keyboards are also not a starter because of the requirements for a laptop; an external keyboard does not occur on an airplane or train.