<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Knowledge Base (Posts about keyboard)</title><link>https://bgstack15.ddns.net/blog/</link><description></description><atom:link href="https://bgstack15.ddns.net/blog/categories/keyboard.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><copyright>Contents © 2026 &lt;a href="mailto:bgstack15@gmail.com"&gt;bgstack15&lt;/a&gt; 
&lt;a rel="license" href="https://www.gnu.org/licenses/gpl-3.0.html"&gt;
&lt;img alt="GNU General Public License v3.0"
style="border-width:0; margin-bottom:12px;"
src="https://bgstack15.ddns.net/.images/gplv3-127x51.png"&gt;&lt;/a&gt;</copyright><lastBuildDate>Sat, 07 Feb 2026 14:15:39 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Gxkb is replacing fbxkb in my workflows, and GTK2 status in Devuan</title><link>https://bgstack15.ddns.net/blog/posts/2026/02/07/gxkb-is-replacing-fbxkb-in-my-workflows-and-gtk-2-status-in-devuan/</link><dc:creator>bgstack15</dc:creator><description>&lt;h2&gt;The story&lt;/h2&gt;
&lt;p&gt;I use a patched &lt;a href="https://bgstack15.ddns.net/blog/cgit/stackrpms/tree/fluxbox/README.md"&gt;Fluxbox&lt;/a&gt; as my window manager. I use &lt;a href="https://bgstack15.ddns.net/blog/posts/2022/10/24/x11-switching-keyboard-layouts/"&gt;fbxkb&lt;/a&gt; as a system tray icon to show me quickly which keyboard layout is active in X11.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://bgstack15.ddns.net/blog/2026/scrot-fbxkb-us.png"&gt;&lt;img alt="" src="https://bgstack15.ddns.net/blog/2026/scrot-fbxkb-us.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://bgstack15.ddns.net/blog/2026/scrot-fbxkb-us-dvorak.png"&gt;&lt;img alt="" src="https://bgstack15.ddns.net/blog/2026/scrot-fbxkb-us-dvorak.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I was reading on &lt;a href="https://bgstack15.ddns.net/blog/outbound/https:/ludditus.com/"&gt;Ludditus&lt;/a&gt; about how Debian is working even harder to &lt;a href="https://bgstack15.ddns.net/blog/outbound/https:/ludditus.com/2026/01/15/debian-has-its-retards-too-they-plan-to-kill-gtk2"&gt;remove gtk2&lt;/a&gt; more. I remember when some of the gtk2 dev packages were first removed from Debian, because I had to switch to using gtk3 to build Palemoon web browser and FreeFileSync. But this recent conversation from Ludditus was the first I'd heard of this recent change, which was a week after the &lt;a href="https://bgstack15.ddns.net/blog/outbound/https:/lists.debian.org/debian-devel/2026/01/msg00090.html"&gt;original announcement&lt;/a&gt; by a guy to the debian-devel mailing list who is not even subscribed to the mailing list. I seem to recall that most mailing lists are set up so you must subscribe in order to send to it. I wonder if this user who started the conversation was abusing permissions or taking advantage of a bad configuration. There's a &lt;a href="https://bgstack15.ddns.net/blog/outbound/https:/lists.debian.org/debian-devel/2026/01/threads.html#00090"&gt;whole thread&lt;/a&gt; you could read for more info on the thunderous applause leading to the death of liberty.&lt;/p&gt;
&lt;p&gt;Anyway, trying to get back to the topic at hand, I discovered that my workflows still dependent on the "offensive" package include the following.&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;$ sudo apt-get remove libgtk2.0-0t64 libgtk2.0-0
The following packages will be REMOVED:
asunder fbxkb gtk-chtheme libgail-common libgail18t64 libgtk2.0-0t64 libgtk2.0-bin libgtkspell0 palemoon pidgin
&lt;span class="m"&gt;0&lt;/span&gt; upgraded, &lt;span class="m"&gt;0&lt;/span&gt; newly installed, &lt;span class="m"&gt;10&lt;/span&gt; to remove and &lt;span class="m"&gt;265&lt;/span&gt; not upgraded.
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;I have yet to address pidgin, which I actively use. I have found GTK3 forks for asunder: &lt;a href="https://bgstack15.ddns.net/blog/outbound/https:/gitlab.gnome.org/Salamandar/GrimRipper"&gt;GrimRipper&lt;/a&gt; and &lt;a href="https://bgstack15.ddns.net/blog/outbound/https:/github.com/rizalmart/asunder-gtk3"&gt;asunder-gtk3&lt;/a&gt;. I have yet to address Palemoon, but I think that one already was using gtk3 also, so I hope it was just an optional dependency on gtk2. I haven't used it in a while; I'll have to grab Steven Pusser's latest &lt;a href="https://bgstack15.ddns.net/blog/outbound/https:/build.opensuse.org/package/show/home:mx-packaging/palemoon-mx23"&gt;palemoon&lt;/a&gt; work.&lt;/p&gt;
&lt;h2&gt;Gxkb and Fbxkb&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://bgstack15.ddns.net/blog/outbound/https:/packages.debian.org/sid/gxkb"&gt;Gxkb&lt;/a&gt; is already very similar to &lt;a href="https://bgstack15.ddns.net/blog/outbound/https:/packages.debian.org/bullseye/fbxkb"&gt;fbxkb&lt;/a&gt;, but it already uses gtk3. I started testing it, and had to poke around for quite a while before I realized the solution for my needs is very simple! All I need to do is set up my &lt;code&gt;{country_code}_{variant}.png&lt;/code&gt; in the correct directory.&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;mkdir -p ~/.local/share/gxkb/flags
cp -pi /mnt/public/Support/Programs/gxkb/us_dvorak.png ~/.local/share/gxkb/flags/
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;That's it. I used ImageMagick (or whatever has supplanted it, et al) &lt;code&gt;convert&lt;/code&gt; to invert the colors so Dvorak shows up as an inverted-color US flag. That is all.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://bgstack15.ddns.net/blog/2026/scrot-gxkb-us.png"&gt;&lt;img alt="" src="https://bgstack15.ddns.net/blog/2026/scrot-gxkb-us.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://bgstack15.ddns.net/blog/2026/scrot-gxkb-us-dvorak.png"&gt;&lt;img alt="" src="https://bgstack15.ddns.net/blog/2026/scrot-gxkb-us-dvorak.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I had forked fbxkb to add some features, but I need zero customization of gxkb! This simplifies my maintenance efforts, not that I had to rebuild fbxkb ever once I built it the way I liked. Here are the customizations I had added to fbxkb, and the current resolution for gxkb:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Display menu on left click, and increment input method on middle click: Can live without the menu; I have only 2 variants for now. If that changes, I might have to implement a menu.&lt;/li&gt;
&lt;li&gt;Enable rotating input methods on scrollwheel scrolling action: Already have this feature.&lt;/li&gt;
&lt;li&gt;Add variant support, e.g., dvorak: Already have this feature.&lt;/li&gt;
&lt;li&gt;Add tooltip: Already have this feature!&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;References and additional reading&lt;/h2&gt;
&lt;h3&gt;Weblinks&lt;/h3&gt;
&lt;p&gt;There might be additional or repeated entries in-line in the post.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="https://bgstack15.ddns.net/blog/outbound/https:/packages.debian.org/sid/gxkb"&gt;Debian -- Details of package gxkb in sid&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://bgstack15.ddns.net/blog/outbound/https:/packages.debian.org/bullseye/fbxkb"&gt;Debian -- Details of package fbxkb in bullseye&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://bgstack15.ddns.net/blog/outbound/https:/build.opensuse.org/package/show/home:bgstack15/fbxkb"&gt;Show home:bgstack15 / fbxkb - openSUSE Build Service&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://bgstack15.ddns.net/blog/outbound/https:/bugs.debian.org/cgi-bin/bugreport.cgi?bug=967337"&gt;#967337 - fbxkb: depends on deprecated GTK 2 - Debian Bug report logs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://bgstack15.ddns.net/blog/outbound/https:/ludditus.com/2026/01/15/debian-has-its-retards-too-they-plan-to-kill-gtk2/#comment-116453"&gt;Debian has its retards too: they plan to kill GTK2! – Homo Ludditus&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;Files&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;file:///mnt/public/Support/Programs/gxkb/gxkb-keyboard-layout-indicator.md&lt;/li&gt;
&lt;/ol&gt;</description><category>devuan</category><category>dvorak</category><category>fluxbox</category><category>input</category><category>keyboard</category><category>narrative</category><category>x11</category><guid>https://bgstack15.ddns.net/blog/posts/2026/02/07/gxkb-is-replacing-fbxkb-in-my-workflows-and-gtk-2-status-in-devuan/</guid><pubDate>Sat, 07 Feb 2026 14:08:00 GMT</pubDate></item><item><title>LibreOffice Customize Keyboard does work, but...</title><link>https://bgstack15.ddns.net/blog/posts/2025/01/27/libreoffice-customize-keyboard-does-work-but/</link><dc:creator>bgstack15</dc:creator><description>&lt;div&gt;&lt;p&gt;When you go to customize keyboard shortcuts so that there's some keystroke for increasing and decreasing font size, you will discover something. And upon taking screenshots for writing this post, everything makes sense now!&lt;/p&gt;
&lt;h2&gt;screenshot, too big&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://bgstack15.ddns.net/blog/2025/scrot-libreoffice-cell-too-big.png"&gt;Screenshot of a cell with a value too large for the width&lt;br&gt;&lt;img alt="" src="https://bgstack15.ddns.net/blog/2025/scrot-libreoffice-cell-too-big.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You will find the &lt;code&gt;Menu Tools... -&amp;gt; Customize... -&amp;gt; dialog tab Menus&lt;/code&gt; and learn the name of the operation that should happen.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://bgstack15.ddns.net/blog/posts/2025/01/27/libreoffice-customize-keyboard-does-work-but/"&gt;Read more…&lt;/a&gt; (3 min remaining to read)&lt;/p&gt;&lt;/div&gt;</description><category>keyboard</category><category>libreoffice</category><category>map</category><category>shortcut</category><guid>https://bgstack15.ddns.net/blog/posts/2025/01/27/libreoffice-customize-keyboard-does-work-but/</guid><pubDate>Mon, 27 Jan 2025 13:56:00 GMT</pubDate></item><item><title>Fluxbox handle capslock media keys</title><link>https://bgstack15.ddns.net/blog/posts/2024/01/06/fluxbox-handle-capslock-media-keys/</link><dc:creator>bgstack15</dc:creator><description>&lt;p&gt;&lt;a href="https://bgstack15.ddns.net/blog/outbound/http:/www.videolan.org/vlc/"&gt;VLC&lt;/a&gt; lets you configure global hotkeys, so you can map your XF86AudioPrev and related keys. However, when my Capslock is on, my keyboard sends different keycodes. Here's my fix for that.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://bgstack15.ddns.net/blog/2024/scrot-vlc-hotkeys.png"&gt;&lt;img alt="" src="https://bgstack15.ddns.net/blog/2024/scrot-vlc-hotkeys.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I wrote a shell script to handle the logic.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://bgstack15.ddns.net/blog/files/2024/listings/vlc-command.html"&gt;files/2024/listings/vlc-command&lt;/a&gt;  &lt;a href="https://bgstack15.ddns.net/blog/files/2024/listings/vlc-command"&gt;(Source)&lt;/a&gt;&lt;/p&gt;&lt;div class="highlight"&gt;&lt;table class="highlighttable"&gt;&lt;tr&gt;&lt;td class="linenos"&gt;&lt;div class="linenodiv"&gt;&lt;pre&gt;&lt;span class="normal"&gt; 1&lt;/span&gt;
&lt;span class="normal"&gt; 2&lt;/span&gt;
&lt;span class="normal"&gt; 3&lt;/span&gt;
&lt;span class="normal"&gt; 4&lt;/span&gt;
&lt;span class="normal"&gt; 5&lt;/span&gt;
&lt;span class="normal"&gt; 6&lt;/span&gt;
&lt;span class="normal"&gt; 7&lt;/span&gt;
&lt;span class="normal"&gt; 8&lt;/span&gt;
&lt;span class="normal"&gt; 9&lt;/span&gt;
&lt;span class="normal"&gt;10&lt;/span&gt;
&lt;span class="normal"&gt;11&lt;/span&gt;
&lt;span class="normal"&gt;12&lt;/span&gt;
&lt;span class="normal"&gt;13&lt;/span&gt;
&lt;span class="normal"&gt;14&lt;/span&gt;
&lt;span class="normal"&gt;15&lt;/span&gt;
&lt;span class="normal"&gt;16&lt;/span&gt;
&lt;span class="normal"&gt;17&lt;/span&gt;
&lt;span class="normal"&gt;18&lt;/span&gt;
&lt;span class="normal"&gt;19&lt;/span&gt;
&lt;span class="normal"&gt;20&lt;/span&gt;
&lt;span class="normal"&gt;21&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class="code"&gt;&lt;div&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="ch"&gt;#!/bin/sh&lt;/span&gt;
&lt;span class="c1"&gt;# Startdate: 2024-01-01-2 14:36&lt;/span&gt;
&lt;span class="c1"&gt;# Purpose: to be a hotkey target for when CapsLock is on but I still press "Play/Pause" media button on the keyboard.&lt;/span&gt;
&lt;span class="c1"&gt;# Usage:&lt;/span&gt;
&lt;span class="c1"&gt;#    In ~/.fluxbox/keys:&lt;/span&gt;
&lt;span class="c1"&gt;#    # For capslock, media previous, pause, skip&lt;/span&gt;
&lt;span class="c1"&gt;#    171 :Exec bin/vlc-command skip&lt;/span&gt;
&lt;span class="c1"&gt;#    172 :Exec bin/vlc-command play-pause&lt;/span&gt;
&lt;span class="c1"&gt;#    173 :Exec bin/vlc-command previous&lt;/span&gt;

&lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="si"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;1&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt;
   &lt;span class="s2"&gt;"play-pause"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
      dbus-send --type&lt;span class="o"&gt;=&lt;/span&gt;method_call --dest&lt;span class="o"&gt;=&lt;/span&gt;org.mpris.MediaPlayer2.vlc /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause
      &lt;span class="p"&gt;;;&lt;/span&gt;
   &lt;span class="s2"&gt;"previous"&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="s2"&gt;"back"&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="s2"&gt;"left"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
      dbus-send --type&lt;span class="o"&gt;=&lt;/span&gt;method_call --dest&lt;span class="o"&gt;=&lt;/span&gt;org.mpris.MediaPlayer2.vlc /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous
      &lt;span class="p"&gt;;;&lt;/span&gt;
   &lt;span class="s2"&gt;"next"&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="s2"&gt;"skip"&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="s2"&gt;"right"&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
      dbus-send --type&lt;span class="o"&gt;=&lt;/span&gt;method_call --dest&lt;span class="o"&gt;=&lt;/span&gt;org.mpris.MediaPlayer2.vlc /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next
      &lt;span class="p"&gt;;;&lt;/span&gt;
&lt;span class="k"&gt;esac&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;And then in my &lt;code&gt;~/.fluxbox/keys&lt;/code&gt; file I added these statements:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;# &lt;span class="k"&gt;For&lt;/span&gt; &lt;span class="nv"&gt;capslock&lt;/span&gt;, &lt;span class="nv"&gt;media&lt;/span&gt; &lt;span class="nv"&gt;previous&lt;/span&gt;, &lt;span class="k"&gt;pause&lt;/span&gt;, &lt;span class="nv"&gt;skip&lt;/span&gt;
&lt;span class="mi"&gt;171&lt;/span&gt; :&lt;span class="k"&gt;Exec&lt;/span&gt; &lt;span class="nv"&gt;bin&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nv"&gt;vlc&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nv"&gt;command&lt;/span&gt; &lt;span class="nv"&gt;skip&lt;/span&gt;
&lt;span class="mi"&gt;172&lt;/span&gt; :&lt;span class="k"&gt;Exec&lt;/span&gt; &lt;span class="nv"&gt;bin&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nv"&gt;vlc&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nv"&gt;command&lt;/span&gt; &lt;span class="nv"&gt;play&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="k"&gt;pause&lt;/span&gt;
&lt;span class="mi"&gt;173&lt;/span&gt; :&lt;span class="k"&gt;Exec&lt;/span&gt; &lt;span class="nv"&gt;bin&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nv"&gt;vlc&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nv"&gt;command&lt;/span&gt; &lt;span class="nv"&gt;previous&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;I derived these of course with &lt;a href="https://bgstack15.ddns.net/blog/outbound/https:/linux.die.net/man/1/xev"&gt;&lt;code&gt;xev(1)&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Errata&lt;/h2&gt;
&lt;p&gt;And the reason I sometimes end up with capslock on is I always use capslock to help wake on a monitor. I thought it was an XKCD comic that pointed out that Windows admins would use Ctrl+Alt+Delete to wake up a system, and that by default that reboots a Linux system, so when I have switched over to using all-Linux years ago, I use other methods (Capslock) to see if a system is awake/locked.&lt;/p&gt;</description><category>capslock</category><category>dbus</category><category>fluxbox</category><category>keyboard</category><guid>https://bgstack15.ddns.net/blog/posts/2024/01/06/fluxbox-handle-capslock-media-keys/</guid><pubDate>Sat, 06 Jan 2024 13:40:25 GMT</pubDate></item><item><title>X11 switching keyboard layouts</title><link>https://bgstack15.ddns.net/blog/posts/2022/10/24/x11-switching-keyboard-layouts/</link><dc:creator>bgstack15</dc:creator><description>&lt;h2&gt;tl;dr&lt;/h2&gt;
&lt;p&gt;For myself:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;sudo apt-get install fbxkb
setxkbmap -option grp:switch,grp:shifts_toggle 'us,us(dvorak)'
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Add to ~/.fluxbox/startup:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;fbxkb &amp;amp;
&lt;/pre&gt;&lt;/div&gt;

&lt;h2&gt;The story&lt;/h2&gt;
&lt;p&gt;I learned that Xorg (if not all X11 implementations) provide input method switching built-in! You can change keyboard layouts with:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;&lt;span class="n"&gt;setxkbmap&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;layout&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;us&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;variant&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;basic&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;To switch to dvorak:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;&lt;span class="n"&gt;setxkbmap&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;layout&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;us&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;variant&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;dvorak&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;While researching in preparation for writing a tray icon utility to show/switch input methods, I learned that you can simply specify multiple input methods, and complex options such as switching between the two:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;setxkbmap -option grp:switch,grp:shifts_toggle,grp_led:scroll 'us(basic),us(dvorak)'
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;See &lt;a href="https://linux.die.net/man/7/xkeyboard-config"&gt;xkeyboard-config(7)&lt;/a&gt; for a list of options.&lt;/p&gt;
&lt;p&gt;And in my research, I also learned that I don't need to write my own &lt;a href="https://bgstack15.ddns.net/cgit/mktrayicon/"&gt;mktrayicon&lt;/a&gt;-powered one: Multiple already exist!&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;xxkb (&lt;a href="https://sourceforge.net/projects/xxkb/"&gt;sourceforge&lt;/a&gt;) (&lt;a href="https://github.com/ramok/xxkb/wiki"&gt;less-dead github fork&lt;/a&gt;). You know an open-source project is old and probably abandoned if it's on sourceforge. It was cool before it went sour. (And it was cool before github was cool and has fallen now too.)&lt;/li&gt;
&lt;li&gt;gxkb (&lt;a href="https://zen-tools.github.io/gxkb/"&gt;origin?&lt;/a&gt;) (&lt;a href="https://github.com/zen-tools/gxkb"&gt;github&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;ibus (&lt;a href="https://github.com/ibus/ibus/wiki"&gt;github&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;fbxkb (&lt;a href="https://fbxkb.sourceforge.net/index.html"&gt;sourceforge&lt;/a&gt;) (&lt;a href="https://packages.debian.org/sid/fbxkb"&gt;in Debian sid&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Fbxkb was the closest to what I wanted visually, functionally, and source code-wise. Multiple sources of fbxkb source code exist, such as a few github places, the sourceforge (abandoned) upstream in svn which I don't use, and the Debian source tarball.&lt;/p&gt;
&lt;p&gt;I did &lt;a href="https://bgstack15.ddns.net/cgit/fbxkb/"&gt;fork&lt;/a&gt; it to add some small steps I wanted:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Display menu on left click, and increment input method on middle click&lt;/li&gt;
&lt;li&gt;Enable rotating input methods on scrollwheel scrolling action&lt;/li&gt;
&lt;li&gt;Add variant support, e.g., dvorak&lt;/li&gt;
&lt;li&gt;Add tooltip&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Research links&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="https://fbxkb.sourceforge.net/faq.html"&gt;https://fbxkb.sourceforge.net/faq.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://unix.stackexchange.com/questions/22903/how-to-re-enable-the-caps-lock-key"&gt;https://unix.stackexchange.com/questions/22903/how-to-re-enable-the-caps-lock-key&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://superuser.com/questions/1194468/invert-colors-with-imagemagick/1376630#1376630"&gt;https://superuser.com/questions/1194468/invert-colors-with-imagemagick/1376630#1376630&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;</description><category>C</category><category>dvorak</category><category>input</category><category>keyboard</category><category>localization</category><category>x11</category><category>xorg</category><guid>https://bgstack15.ddns.net/blog/posts/2022/10/24/x11-switching-keyboard-layouts/</guid><pubDate>Mon, 24 Oct 2022 13:01:40 GMT</pubDate></item><item><title>Keyboard LEDs trayicons in C</title><link>https://bgstack15.ddns.net/blog/posts/2022/10/16/keyboard-leds-trayicons-in-c/</link><dc:creator>bgstack15</dc:creator><description>&lt;p&gt;I previously wrote a small tool for myself named &lt;a href="https://bgstack15.ddns.net/cgit/keyboard-leds-trayicons/about/"&gt;keyboard-leds-trayicons&lt;/a&gt;, which wraps around &lt;a href="https://bgstack15.ddns.net/cgit/mktrayicon/"&gt;mktrayicon&lt;/a&gt; to provide system tray icons that indicate the current status of Capslock and Numlock.&lt;/p&gt;
&lt;p&gt;Well, I decided to learn some C programming and rewrite my cruddy shell scripts with their silly extra &lt;code&gt;sleep 0.75&lt;/code&gt; invocations. I incorporated the entirety of mktrayicon.c, and wrote new logic.&lt;/p&gt;
&lt;p&gt;I started piecemeal: at first just adding basic fifo controls to the child processes. Then I got fancy and added Unix domain sockets. This has been a labor of love, and now it is ready to be shared. You can see the almost-product-worthy &lt;a href="https://bgstack15.ddns.net/cgit/keyboard-leds-trayicons/tree/experimental?h=experimental"&gt;keyboard-leds-trayicons.c&lt;/a&gt; now. I enjoyed adding getopt and libinih support. C is such a good way to write small programs like this. I even learned how to use libxdo (which powers &lt;a href="https://www.semicomplete.com/projects/xdotool/"&gt;xdotool&lt;/a&gt;) so you can click the tray icons to toggle Capslock and Numlock!&lt;/p&gt;
&lt;p&gt;&lt;a href="https://bgstack15.ddns.net/blog/2022/10/klt_screenshot.png"&gt;&lt;img alt="" src="https://bgstack15.ddns.net/blog/2022/10/klt_screenshot.png"&gt;&lt;/a&gt;&lt;/p&gt;</description><category>C</category><category>capslock</category><category>keyboard</category><category>numlock</category><category>programming</category><guid>https://bgstack15.ddns.net/blog/posts/2022/10/16/keyboard-leds-trayicons-in-c/</guid><pubDate>Sun, 16 Oct 2022 13:01:19 GMT</pubDate></item><item><title>Add custom udev hardware definition for extra keys on keyboard</title><link>https://bgstack15.ddns.net/blog/posts/2021/06/08/add-custom-udev-hardware-definition-for-extra-keys-on-keyboard/</link><dc:creator>bgstack15</dc:creator><description>&lt;p&gt;My old &lt;a href="https://www.amazon.com/HP-Hewlett-Packard-Keyboard-5187-1767/dp/B00BNHT91U"&gt;HP keyboard&lt;/a&gt; has an extra row of buttons, with icons like
"camera" and "music" and "shopping cart." On my exact keyboard, only the
globe, magnifying glass, and envelope buttons register. Well, I finally
decided to do something about it, and of course the Arch wiki has some great
info. The process is more important than the output, because everybody's
hardware is different.&lt;/p&gt;
&lt;pre class="code literal-block"&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="c1"&gt;# File: /etc/udev/hwdb.d/60-keyboard-hp5183.hwdb&lt;/span&gt;
&lt;span class="c1"&gt;# Locations:&lt;/span&gt;
&lt;span class="c1"&gt;#    /mnt/public/Support/Systems/hp-5183-keyboard/60-keyboard-hp5183.hwdb&lt;/span&gt;
&lt;span class="c1"&gt;# Author: bgstack15&lt;/span&gt;
&lt;span class="c1"&gt;# Startdate: 2021-06-04&lt;/span&gt;
&lt;span class="c1"&gt;# Title: Udev definition for extra keys on HP 5183 keyboard&lt;/span&gt;
&lt;span class="c1"&gt;# Purpose: Allow use of the extra keys on the keyboard&lt;/span&gt;
&lt;span class="c1"&gt;# Usage:&lt;/span&gt;
&lt;span class="c1"&gt;#    Place this file in /etc/udev/hwdb.d/&lt;/span&gt;
&lt;span class="c1"&gt;#    modify /usr/lib/systemd/system/systemd-hwdb-update.service by commenting out ConditionNeedsUpdate=/etc&lt;/span&gt;
&lt;span class="c1"&gt;#    sudo systemctl daemon-reload (only after that first modification to that service file)&lt;/span&gt;
&lt;span class="c1"&gt;#    sudo systemd-hwdb update&lt;/span&gt;
&lt;span class="c1"&gt;#    sudo udevadm trigger&lt;/span&gt;
&lt;span class="c1"&gt;#    Validate with: udevadm info /dev/input/by-path/platform-i8042-serio-0-event-kbd | grep KEYBOARD_KEY&lt;/span&gt;
&lt;span class="c1"&gt;# Reference:&lt;/span&gt;
&lt;span class="c1"&gt;#    evemu(1) provides the name of the device, which you prepend with "evdev:atkbd:" and trim some stuff off at the en&lt;/span&gt;
&lt;span class="n"&gt;d&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;
&lt;span class="c1"&gt;#    /usr/lib/udev/hwdb.d/60-keyboard.hwdb&lt;/span&gt;
&lt;span class="c1"&gt;#    https://wiki.archlinux.org/title/Map_scancodes_to_keycodes&lt;/span&gt;
&lt;span class="c1"&gt;#    https://wiki.archlinux.org/title/Keyboard_input&lt;/span&gt;
&lt;span class="c1"&gt;#    just visit the CTRL+ALT+F2 console and press the keys that are not mappable/registered for xev.&lt;/span&gt;
&lt;span class="c1"&gt;#    /usr/include/linux/input-event-codes.h provides the basis for key names&lt;/span&gt;
&lt;span class="c1"&gt;#    example files at /usr/lib/udev/hwdb.d/60-keyboard.hwdb are best&lt;/span&gt;
&lt;span class="n"&gt;evdev&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="n"&gt;atkbd&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="n"&gt;dmi&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="n"&gt;bvnHewlett&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;Packard&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="n"&gt;bvrK01v02&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;05&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="n"&gt;bd05&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;07&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;2012&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="n"&gt;br2&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="n"&gt;svnHewlett&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;Packard&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="n"&gt;pnHPCompaqElite8300SFF&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="n"&gt;pvr&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;
 &lt;span class="n"&gt;KEYBOARD_KEY_9f&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;camera&lt;/span&gt;          &lt;span class="c1"&gt;# camera&lt;/span&gt;
 &lt;span class="n"&gt;KEYBOARD_KEY_96&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;media&lt;/span&gt;           &lt;span class="c1"&gt;# music&lt;/span&gt;
 &lt;span class="n"&gt;KEYBOARD_KEY_b9&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;switchvideomode&lt;/span&gt; &lt;span class="c1"&gt;# camcorder&lt;/span&gt;
 &lt;span class="n"&gt;KEYBOARD_KEY_94&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;prog1&lt;/span&gt;           &lt;span class="c1"&gt;# "hp"&lt;/span&gt;
&lt;span class="c1"&gt;# b4 already defined: globe&lt;/span&gt;
 &lt;span class="n"&gt;KEYBOARD_KEY_a6&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;help&lt;/span&gt;            &lt;span class="c1"&gt;# question mark&lt;/span&gt;
&lt;span class="c1"&gt;# e1 already defined: magnifying glass&lt;/span&gt;
 &lt;span class="n"&gt;KEYBOARD_KEY_9e&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;shop&lt;/span&gt;            &lt;span class="c1"&gt;# shopping cart&lt;/span&gt;
&lt;span class="c1"&gt;# a3 already defined: mail&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;References&lt;/h2&gt;
&lt;h3&gt;Weblinks&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="https://wiki.archlinux.org/title/Map_scancodes_to_keycodes"&gt;Map scancodes to keycodes - ArchWiki&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href="https://wiki.archlinux.org/title/Keyboard_input#Identifying_scancodes"&gt;Keyboard input - ArchWiki&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Local files&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;&lt;code&gt;/usr/lib/udev/hwdb.d/60-keyboard.hwdb&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/usr/include/linux/input-event-codes.h&lt;/code&gt; provides the basis for key names&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/usr/lib/udev/hwdb.d/60-keyboard.hwdb&lt;/code&gt; has the best examples&lt;/li&gt;
&lt;/ol&gt;</description><category>hardware</category><category>key</category><category>keyboard</category><category>udev</category><guid>https://bgstack15.ddns.net/blog/posts/2021/06/08/add-custom-udev-hardware-definition-for-extra-keys-on-keyboard/</guid><pubDate>Tue, 08 Jun 2021 12:33:44 GMT</pubDate></item><item><title>Package for devuan: keyboard-leds-trayicons</title><link>https://bgstack15.ddns.net/blog/posts/2020/02/28/package-for-devuan-keyboard-leds-trayicons/</link><dc:creator>bgstack15</dc:creator><description>&lt;p&gt;I recently purchased a ThinkPad P50s and I love it! However, it doesn't have
indicators for capslock and numlock. So I wrote a tool to simulate them!
&lt;a href="https://gitlab.com/bgstack15/keyboard-leds-trayicons"&gt;Keyboard-leds-trayicons&lt;/a&gt; is my solution. You can go install it in Devuan Ceres from &lt;a href="https://build.opensuse.org/package/show/home:bgstack15/keyboard-leds-trayicons"&gt;my
OBS&lt;/a&gt;. Reading the status of capslock and numlock is trivial on the
command line:&lt;/p&gt;
&lt;pre class="code literal-block"&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nv"&gt;xset&lt;/span&gt; &lt;span class="nv"&gt;q&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="nv"&gt;awk&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;function d2b(d,b) {while(d) {b=d%2b;d=int(d/2)}return(b)} /LED/{print d2b($NF)}&lt;/span&gt;&lt;span class="s1"&gt;'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The awk is there to convert the provided decimal value into a binary. But how
do you poll this, and display it in your X11 session in an unobtrusive way?
With a POSIX shell script, of course! But what about the actual icons? Use &lt;a href="https://gitlab.com/bgstack15/mktrayicon"&gt;my
fork&lt;/a&gt; of
&lt;a href="https://github.com/jonhoo/mktrayicon"&gt;mktrayicon&lt;/a&gt;. My fork adds a few
patches, and you can also get it at the OBS link above. &lt;img alt="capslock and numlock
indicators in system tray, both
on" src="https://bgstack15.ddns.net/blog/2020/02/2020-02-20-164023_111x32_scrot.png"&gt;
&lt;img alt="capslock and numlock indicators in system tray, capslock off and numlock
on" src="https://bgstack15.ddns.net/blog/2020/02/2020-02-20-164032_155x28_scrot.png"&gt;
Obviously most people have no need for this package. And by now anyone without
the indicators probably doesn't need them. This project was 99% for myself,
but I like to share. The default icons are a bit boring, which fits my style.
But the tool uses the &lt;a href="https://specifications.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html"&gt;xdg icon
spec&lt;/a&gt;, so you can add your own icons for capslock-on and similar.
Patches are welcome to the project, so if you really think this package should
include more icons, or use yours by default, please open a merge request!&lt;/p&gt;</description><category>capslock</category><category>devuan</category><category>icon</category><category>indicator</category><category>indicators</category><category>keyboard</category><category>numlock</category><category>obs</category><category>system tray</category><guid>https://bgstack15.ddns.net/blog/posts/2020/02/28/package-for-devuan-keyboard-leds-trayicons/</guid><pubDate>Fri, 28 Feb 2020 13:33:56 GMT</pubDate></item><item><title>A few useful keybindings for Window Manager in Xfce</title><link>https://bgstack15.ddns.net/blog/posts/2018/06/18/a-few-useful-keybindings-for-window-manager-in-xfce/</link><dc:creator>bgstack15</dc:creator><description>&lt;pre class="code literal-block"&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;xfce4-keyboard-shortcuts /xfwm4/custom/Down             tile_down_left_key
xfce4-keyboard-shortcuts /xfwm4/custom/Left             tile_up_left_key
xfce4-keyboard-shortcuts /xfwm4/custom/Right            tile_down_right_key
xfce4-keyboard-shortcuts /xfwm4/custom/Up               tile_up_right_key
xfce4-keyboard-shortcuts /xfwm4/custom/Down                  tile_down_key
xfce4-keyboard-shortcuts /xfwm4/custom/Left                  tile_left_key
xfce4-keyboard-shortcuts /xfwm4/custom/Right                 tile_right_key
xfce4-keyboard-shortcuts /xfwm4/custom/Up                    tile_up_key
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I found that by having these values, I can use the keyboard to control the
window placement with almost identical functionality as Cinnamon. This was one
of the key differences (no pun intended) for me between Xfce and Cinnamon. To
import these settings with that input as is, check out
&lt;a href="https://gitlab.com/bgstack15/bgconf/blob/master/usr/share/bgconf/inc/xfconf.sh"&gt;xfconf.sh&lt;/a&gt;.
I describe it here on the blog at &lt;a href="https://bgstack15.ddns.net/blog/posts/2017/10/08/xfconf-query-save-and-load-from-file/"&gt;xfconf-query save and load from
file&lt;/a&gt;&lt;/p&gt;</description><category>keyboard</category><category>xfce</category><guid>https://bgstack15.ddns.net/blog/posts/2018/06/18/a-few-useful-keybindings-for-window-manager-in-xfce/</guid><pubDate>Mon, 18 Jun 2018 13:29:47 GMT</pubDate></item><item><title>KDE always show keyboard underscores</title><link>https://bgstack15.ddns.net/blog/posts/2017/05/01/kde-always-show-keyboard-underscores/</link><dc:creator>bgstack15</dc:creator><description>&lt;h2&gt;Overview&lt;/h2&gt;
&lt;p&gt;I like to use the keyboard to interact with my computer, even in the gui. On
my KDE system, I wanted my accelerator keys to always be visible. I had to
poke around the World Wide Web for a while to find out exactly how to do that.
These instructions are valid for kdelibs 6:4.14.30-1.fc25.&lt;/p&gt;
&lt;h2&gt;KDE always show accelerator keys&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Open up "System Settings" application.&lt;/li&gt;
&lt;li&gt;Select "Application Style."&lt;/li&gt;
&lt;li&gt;Select "Widget Style" tab.&lt;/li&gt;
&lt;li&gt;Select "Configure..." button beside Widget style.&lt;a href="https://bgstack15.ddns.net/blog/2017/04/configure-breeze.png"&gt;&lt;img alt="" src="https://bgstack15.ddns.net/blog/2017/04/configure-breeze.png"&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Adjust "Keyboard accelerators visibility" to "Always show keyboard"&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;References&lt;/h2&gt;
&lt;h3&gt;Weblinks&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Instructions for an older version of kde &lt;a href="https://ubuntuforums.org/showthread.php?t=1384425"&gt;https://ubuntuforums.org/showthread.php?t=1384425&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;</description><category>accelerators</category><category>kde</category><category>keyboard</category><category>productivity</category><guid>https://bgstack15.ddns.net/blog/posts/2017/05/01/kde-always-show-keyboard-underscores/</guid><pubDate>Mon, 01 May 2017 12:54:05 GMT</pubDate></item></channel></rss>