Keyboards: Difference between revisions

From Achintya Rao’s Wiki
Update info on compose
Line 23: Line 23:
[https://github.com/kmonad/kmonad <code>KMonad</code>] allows you to customise all kinds of keyboards, including the built-in ones on laptops. You can create layers, remap keys and more.
[https://github.com/kmonad/kmonad <code>KMonad</code>] allows you to customise all kinds of keyboards, including the built-in ones on laptops. You can create layers, remap keys and more.
Since there are no packages for [[Ubuntu]], I grabbed the pre-compiled binary, ran <code>chmox +x</code> on it and moved it to <code>/usr/local/bin</code>.
Since there are no packages for [[Ubuntu]], I grabbed the pre-compiled binary, ran <code>chmox +x</code> on it and moved it to <code>/usr/local/bin</code>.
I need to set up the configuration and start-up files before it can work.
I need to set up the configuration and start-up files before it can work. Alternatives include [https://github.com/jtroo/kanata kanata] and [https://github.com/rvaiya/keyd keyd].


=== Disabling laptop keyboard ===
=== Disabling laptop keyboard ===

Revision as of 09:03, 6 October 2025

This page contains more than just information about typing. Specifically it deals with [customising] keyboards in general.

Compose key

On my ThinkPad running Kubuntu, I have my Right Ctrl key mapped to Compose. This allows me to type symbols like ¶ and § by entering the right sequence of keys (Right Ctrl+p+! and Right Ctrl+s+o respectively). To get a list of all available combinations, type the following in the terminal (via Ask Ubuntu):

 cat /usr/share/X11/locale/en_US.UTF-8/Compose

I have also mapped the AltGr key to choose third-level characters. For this to work, I also have to enable “Enable extra typographic characters” under “Compatibility options” in the keyboard settings.

Mechanical keyboards

I was gifted a Corsair K95 RGB Platinum keyboard for my birthday in 2021. While Corsair does not provide software for controlling the keyboard profiles and lights, there is a free/open-source alternative called ckb-next. Unfortunately, one cannot write the profiles to the keyboard’s hardware from Linux, so I need to do so using a different machine.

Other keyboard software

KMonad allows you to customise all kinds of keyboards, including the built-in ones on laptops. You can create layers, remap keys and more. Since there are no packages for Ubuntu, I grabbed the pre-compiled binary, ran chmox +x on it and moved it to /usr/local/bin. I need to set up the configuration and start-up files before it can work. Alternatives include kanata and keyd.

Disabling laptop keyboard

If I want to disable the built-in keyboard on my laptop (if I’m connected to an external keyboard, for example), I can run the following in the terminal and it will stop using the internal one:

    xinput disable "AT Translated Set 2 keyboard"

I can then replace disable with enable to reactivate it. Since I don’t yet know how to automate this so that the internal one is disabled automatically when a USB keyboard is connected, I have to remember to reactive it when I disconnect the laptop from the hub and take it with me.