Forum › Forums › Orphaned Posts › antiX-17 “Heather Heyer, Helen Keller” › I would like to make a keyboard shortcut for xkill in fluxbox–how?
- This topic has 3 replies, 3 voices, and was last updated Jun 19-8:45 pm by Anonymous.
-
AuthorPosts
-
June 18, 2019 at 3:32 pm #23338Member
Sadshark [p.n.2001]
Hi all. I’ve been using Antix on my secondary netbook PC for over 2 years now. Never been disappointed. However, I am a bit confused about how I add keyboard shortcuts to Fluxbox, because in Kubuntu I just type in “keyboard shortcuts” and get a settings menu for it. I’d ideally like to map a shortcut for xkill to the Meta/Windows and Plus keys, same as on my desktop PC.
Running antinataliX GNU/Linux 19.9 on my Compaq Mini 110c-1100
On my desktop running Kubuntu 18.04 LTS
The antinatalist antifascist childfree vegan mini-manifesto
Bertolt Brecht's beautiful poem, the Unconquerable Inscription.June 18, 2019 at 5:06 pm #23340Anonymous
::cd ~/.fluxbox
(or browse to that directory using a file manager)open this file in a text editor
~/.fluxbox/keysFind in file: “xkill” (noquotes)
You’ll discover that a keybind (aka keyboard shortcut) for xkill already exists,
but the line declaring its assignment is outcommented by default (prefixed with an exclamation point).!Control Mod1 x: ExecCommand xkill
If you remove the exclamation point and Save the file…
…it will take effect immediately after you
1) visit the menu and click “Fluxbox Settings }} Reconfigure”
or
2) logout and login
or
3) initiate a new session via “Menu }} Other Desktops }} *fluxbox*”
(fluxbox, “fluxbox-min”, or “rox-fluxbox”, or “Space-Fluxbox”)if you JUST remove the exclamation point, the default assignment is
Ctrl+Alt xYou can reassign it to any combination you wish ~~ but scan the other definitions within the keys file to ensure you choose a combi which is not already assigned to something else. (If you neglect to do so, and 2+ lines assign the same combo, the last-read aka bottommost line “wins” takes precedence.)
I’d ideally like to map a shortcut for xkill to the Meta/Windows and Plus keys
### TIP: Mod1 is the Alt key on the PC keyboard and Mod4 is usually a key branded with a familiar company logo.
### You can get a list of possible modifiers by calling “xmodmap -pm”
### (it will also show you to which keys the modifiers are mapped)
### EXAMPLE OUTPUT:
### demo@antix1:/tmp# xmodmap -pm
### xmodmap: up to 4 keys per modifier, (keycodes in parentheses):
###
### shift Shift_L (0x32), Shift_R (0x3e)
### lock Caps_Lock (0x42)
### control Control_L (0x25), Control_R (0x69)
### mod1 Alt_L (0x40), Alt_R (0x6c), Meta_L (0xcd)
### mod2 Num_Lock (0x4d)
### mod3
### mod4 Super_L (0x85), Super_R (0x86), Super_L (0xce), Hyper_L (0xcf)
### mod5 ISO_Level3_Shift (0x5c), Mode_switch (0xcb)
###
##### MOUSE BUTTON ASSIGNMENTS MAY DIFFER ACROSS SYSTEMS.
##### CAN TEST YOURS BY RUNNING THE COMMAND
##### xev |grep button
##### ON MY SYSTEM, USING A GENERIC 3-BUTTON MOUSE:
##### leftMouseClick = Mouse1
##### rightMouseClick = Mouse3
##### middle(wheel)Click = Mouse2
##### wheel rockForward = Mouse4
##### wheel rockBack = Mouse5alternatively:
Control Center }} Edit Fluxbox Settings
^—– this will open the keys file + several other related files in a tabbed editor.For more info, see https://download.tuxfamily.org/antix/docs-antiX-17/FAQ/fluxbox.html
and
commandline: apropos fluxbox____________________________
I am not a botJune 19, 2019 at 5:43 pm #23440Forum Admin
Dave
::Another (gui) way that I wrote a long time ago is add-keys. Though by this time it is probably looking a little outdated and probably could use a functional update….
Computers are like air conditioners. They work fine until you start opening Windows. ~Author Unknown
June 19, 2019 at 8:45 pm #23453Anonymous
::@ Dave
add-keys
add-key
is brittle and buggy, as tested with fluxbox.Separate apps for each of the window managers might be preferable,
vs detecting which WM is in use and workaround-ing its particular keyfile quirks.Such a gui app begs available docs, and presence of an in-app Help button.
Frankly, I would rather (and have chosen to) provide verbose helptext tips+comments
inline within the fluxbox keys file, and I steer fluxbox users toward directly editing the config file.===================
snippet from testing notes:
add-key does not offer “Shift key” as a choice
( presumes the gui-clicking user “knows” Shift ~= Mod1 )add-key-antix package installs no docs, nor manpage… and presumes user recognizes “Super” ~= Mod4
(and presumes that, on a particular system, Super does in fact map to Mod4)abends when user attempts to set
Ctrl + [no selection] + 0 = anycommandWhen a line stating
# Ctrl 0 :toggledecor
exists within ~/.fluxbox/keys
and user attempts to set
Ctrl + None + 0 = anycommand
add-key incorrectly reports “that keybind is already used” (and exits)Each time an “add” operation is successful,
add-key displays success confirmation dialog, immediately followed by [Traceback] and exitsTraceback (most recent call last):
File “/usr/local/bin/add-key”, line 340, in apply
Remove.updateRemoveSelect(self)
TypeError: unbound method updateRemoveSelect() must be called with Remove instance as first argument (got Add instance instead)
^CTraceback (most recent call last):
File “/usr/local/bin/add-key”, line 446, in <module>
gtk.main() -
AuthorPosts
- You must be logged in to reply to this topic.