I’m messing about, writing some code that simulates keyboard/input device events to automate various things under linux. I’ve been using /usr/include/linux/input-event-codes.h as a bit of a reference for what key-codes are available. Within that header, it mentions that some of the content is base…
Tag: keyboard
XFCE – keyboard configuration migration
where are the Xfce store keyboard configurations for a migration? I want to prepare the “startup” script to prepare newly installed Linux to match my preference and persistently set up a Czech keyboard for the user who runs it. I try lots of Google and documentation but sadly I can’t find a …
How to debug USB HID scancode-keycode translation in Linux
I have recently converted a 122-key terminal keyboard to USB as a configfs USB gadget (the keyboard portion is using HID codes), it works quite well in except that I cannot seem to get my Archlinux installation to recognize certain HID codes (specifically at the moment F13-F24) and translate them into event c…
Bash – How to run code whenever USB device is connected
I am writing a bash script to automatically detect when my USB keyboard is plugged into my laptop (running Ubuntu 14), so I can change the keyboard layout automatically. Here is my code so far (I got it from another post on Stack Overflow so I’m not 100% sure how it works) I have got this to run on star…
Kernel update causes keyboard layout change and unable to decrypt luks encryption
I’m using Fedora 23, LUKS encrypted disk and multiple keyboard input sources for all the languages I’m daily using and switching between. When there is kernel update available and I forget to switch to enUS as primary keyboard layout then I can not decrypt LUKS partition since wrong keyboard layou…
Emacs, Linux and international keyboard layouts
Is there an easy way to use Emacs key-bindings when you are using a not-English (Russian) keyboard layout? Whenever an international layout is on, all keystrokes are interpreted literally, M-ф instead of M-a. As a result I can’t use commands. It would also be nice if Linux could interpret non-prefixed a…
How to detect if USB keyboard is plugged and unplugged
Is there any daemon/tool which will trigger some signal/event when USB keyboard is plugged and unplugged from pc? I need to know in my program when USB keyboard is plugged and unplugged. Any ideas on how to do this? Answer udev (Linux device manager) is the one that polls hardware. When it detects some change…