<?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 input)</title><link>https://bgstack15.ddns.net/blog/</link><description></description><atom:link href="https://bgstack15.ddns.net/blog/categories/input.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>Xscreensaver uses X11 xkbmap!</title><link>https://bgstack15.ddns.net/blog/posts/2022/12/15/xscreensaver-uses-x11-xkbmap/</link><dc:creator>bgstack15</dc:creator><description>&lt;p&gt;I use multiple input methods for X11, including QWERTY and Dvorak layouts for English (US). How I do that is with &lt;a href="https://bgstack15.ddns.net/blog/outbound/https:/linux.die.net/man/1/setxkbmap"&gt;&lt;code&gt;setxkbmap&lt;/code&gt;&lt;/a&gt;:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;setxkbmap -option grp:switch,grp:shifts_toggle 'us,us(dvorak)'
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;The option grp allows me to use both shift keys at the same time to switch input. I've discussed this before, where I use my fork of &lt;a href="https://bgstack15.ddns.net/blog/posts/2022/10/24/x11-switching-keyboard-layouts/"&gt;fbxkb&lt;/a&gt; to display which variant is active.&lt;/p&gt;
&lt;p&gt;I learned recently that xscreensaver happily displays which input method is active, so you don't have to get frustrated as to why your password is not working!&lt;/p&gt;
&lt;p&gt;&lt;a href="https://bgstack15.ddns.net/blog/2022/12/xscreensaver-shows-input-method.png"&gt;&lt;img alt="" src="https://bgstack15.ddns.net/blog/2022/12/xscreensaver-shows-input-method.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Also, as a bonus, as you can see in my screenshot I used Xephyr to run a nested X11 display. I ran these commands (among multiple terminal windows):&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;Xephyr -screen 800x600 :1
killall xscreensaver
DISPLAY=:1 xscreensaver
DISPLAY=:1 xscreensaver-command --lock
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;And then I could take a screenshot of my xscreensaver lock screen on GNU/Linux.&lt;/p&gt;</description><category>input</category><category>linux</category><category>x11</category><category>xscreensaver</category><guid>https://bgstack15.ddns.net/blog/posts/2022/12/15/xscreensaver-uses-x11-xkbmap/</guid><pubDate>Thu, 15 Dec 2022 14:04:36 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>Pyjstest: view gamepad input with python</title><link>https://bgstack15.ddns.net/blog/posts/2022/07/12/pyjstest-view-gamepad-input-with-python/</link><dc:creator>bgstack15</dc:creator><description>&lt;p&gt;I recently got the urge to connect my old USB gamepads and play retro games with them. (Specifically, Jazz Jackrabbit 2 if you care). I spent a week whipping up a small GUI interface to do that.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://bgstack15.ddns.net/blog/2022/07/pyjstest.png"&gt;&lt;img alt="" src="https://bgstack15.ddns.net/blog/2022/07/pyjstest.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Dependencies&lt;/h3&gt;
&lt;p&gt;On Devuan-like systems use packages:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;python3-sdl2&lt;/li&gt;
&lt;li&gt;python3-pygame&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;How to use&lt;/h3&gt;
&lt;p&gt;You may attach the USB gamepad before or after running this program. For best results, do not connect multiple gamepads at a time.&lt;/p&gt;
&lt;p&gt;Add new configs to &lt;code&gt;config.py&lt;/code&gt;, with a simple declarative syntax that is documented briefly with the two given examples. Feel free to share additional configs with this upstream. Gather aliases for attached gamepads with the helper files in directory &lt;code&gt;extras/&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;Upstream&lt;/h3&gt;
&lt;p&gt;The upstream for the project is at &lt;a href="https://bgstack15.ddns.net/cgit/pyjstest/"&gt;https://bgstack15.ddns.net/cgit/pyjstest/&lt;/a&gt; or &lt;a href="https://gitlab.com/bgstack15/pyjstest/"&gt;https://gitlab.com/bgstack15/pyjstest/&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;Reason for existence&lt;/h3&gt;
&lt;p&gt;I wanted to build a simple input-reaction program, and test my python skills, and learn some sdl2. SDL2 has python3 bindings available, but most of the documentation on the Internet is for the C library.&lt;/p&gt;
&lt;h3&gt;Alternatives&lt;/h3&gt;
&lt;p&gt;For basic input display on cli and gtk displays, use these utilities.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;jstest&lt;/li&gt;
&lt;li&gt;jstest-gtk&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Improvements&lt;/h3&gt;
&lt;p&gt;I need to redesign this to handle multiple attached devices. Right now, it supports only one.&lt;/p&gt;</description><category>gamepad</category><category>input</category><category>joystick</category><category>python</category><guid>https://bgstack15.ddns.net/blog/posts/2022/07/12/pyjstest-view-gamepad-input-with-python/</guid><pubDate>Tue, 12 Jul 2022 13:27:18 GMT</pubDate></item></channel></rss>