Custom Keybindings Openbox
How to Add Custom Keybindings in Openbox | Daniel ... https://www.danielrosehill.co.il/myblog/how-to-add-c...
Daniel Rosehill Blog Linux, writing, and more
ALL GENERAL FREELANCING HOW TO LINUX BACKUP TECH MISC REVIEWS VIDEO ABOUT I’M HERE TOO LINKS MY WRITING
17 IYYAR 5780 How to Add Custom Keybindings in Openbox Topics: Customiza�on, Linux, Openbox, Ubuntu
If you’re s�ll running LXDE, or are using Openbox through some other lightweight desktop environment (DE) then you might be interested in crea�ng custom keybindings to be able to do everything from shu�ng down the computer to opening your favorite Chrome app at the touch of a bu�on.
Fortunately, because Openbox, like LXDE, is a lightweight piece of so�ware, crea�ng these is not too complicated. Follow these steps to have your keyboard doing exactly what you want — just be careful not to overwrite keyboard shortcuts built into programs which you might use regularly!
Open the Openbox con�guration �le
1 of 21 06/07/2020, 21:19 How to Add Custom Keybindings in Openbox | Daniel ... https://www.danielrosehill.co.il/myblog/how-to-add-c...
Creating Openbox keybindings in LXDE (Linux Ubuntu)
Firstly, navigate to the default Openbox configura�on file. In both LXDE and Ubuntu this can be found within:
1. /home/$user/.config/openbox
(Replacing $user with your username).
If you’re using LXDE the file is lxde-rc.xml. In Lubuntu, the corresponding file is lubuntu-rc.xml.
It’s best prac�ce to take a backup of the file before making any chances. I typically just append the date as a suffix in DDMMYY format:
1. cp lxde-rc.xml lxde-rc-DDMMYY.xml
You can then open the file in your IDE of choice.
Use xev to capture key
2 of 21 06/07/2020, 21:19 How to Add Custom Keybindings in Openbox | Daniel ... https://www.danielrosehill.co.il/myblog/how-to-add-c...
identi�ers
A�aching keys to specific commands is as easy as looking up the key’s iden�fier. You can use the xev tool in order to do this.
Xev will output the coordinates of your mouse movements and the iden�fiers of the keys that you type back into the terminal. Just make sure to type the keystrokes while the capture box is in focus:
Assign Keybindings
A�er ge�ng familiar with the layout of lxde.rc.xml you can begin adding in your own custom keybindings — or reassigning exis�ng ones.
Just pay a�en�on to the
3 of 21 06/07/2020, 21:19 How to Add Custom Keybindings in Openbox | Daniel ... https://www.danielrosehill.co.il/myblog/how-to-add-c...
the keybindings are allowed to run.
But you can easily decipher the basic format:
1.
The above is a keybinding I have been using for years to make it easy for me to put my desktop into suspend rather than turning it off. It requires the pm-u�ls u�lity. But simply pressing the scroll lock key will automa�cally put my PC into the suspend state.
The only other edit I had to create to make this work was to disable wake from USB devices.
You can find the wake states of your various devices using:
1. cat /proc/acpi/wakeup
A�er some experimenta�on I was then able to pass:
1.
sudo sh -c “echo XHC > /proc/acpi/wakeup”
If you like the thought of se�ng a suspend keybinding but are running into difficulty with your wireless mouse/keyboard waking the device without your interven�on, you can find more informa�on and details on AskUbuntu and here.
Sample edited default Openbox
4 of 21 06/07/2020, 21:19 How to Add Custom Keybindings in Openbox | Daniel ... https://www.danielrosehill.co.il/myblog/how-to-add-c...
con�guration �le
Lower (10%), raise (10%), and toggle mute using the bo�om three bu�ons on the numeric keypad:
1.
I use the Pause Break key to call up a Chrome App shortcut that launches Brain.fm:
1.
I use Flameshot for screenshots. I mapped the flameshot gui command onto the Print Screen key:
1.
And of course I can suspend the computer directly using Scroll Lock.
Just make sure to install pm-utils first:
5 of 21 06/07/2020, 21:19 How to Add Custom Keybindings in Openbox | Daniel ... https://www.danielrosehill.co.il/myblog/how-to-add-c...
1.
Here’s the snippet in full:
1. 2. 3. 5.
6 of 21 06/07/2020, 21:19 How to Add Custom Keybindings in Openbox | Daniel ... https://www.danielrosehill.co.il/myblog/how-to-add-c...
40.
7 of 21 06/07/2020, 21:19 How to Add Custom Keybindings in Openbox | Daniel ... https://www.danielrosehill.co.il/myblog/how-to-add-c...
98.
8 of 21 06/07/2020, 21:19 How to Add Custom Keybindings in Openbox | Daniel ... https://www.danielrosehill.co.il/myblog/how-to-add-c...
148.
9 of 21 06/07/2020, 21:19 How to Add Custom Keybindings in Openbox | Daniel ... https://www.danielrosehill.co.il/myblog/how-to-add-c...
205.
10 of 21 06/07/2020, 21:19 How to Add Custom Keybindings in Openbox | Daniel ... https://www.danielrosehill.co.il/myblog/how-to-add-c...
263.
11 of 21 06/07/2020, 21:19 How to Add Custom Keybindings in Openbox | Daniel ... https://www.danielrosehill.co.il/myblog/how-to-add-c...
321.
12 of 21 06/07/2020, 21:19 How to Add Custom Keybindings in Openbox | Daniel ... https://www.danielrosehill.co.il/myblog/how-to-add-c...
377.
13 of 21 06/07/2020, 21:19 How to Add Custom Keybindings in Openbox | Daniel ... https://www.danielrosehill.co.il/myblog/how-to-add-c...
433. 434.
14 of 21 06/07/2020, 21:19 How to Add Custom Keybindings in Openbox | Daniel ... https://www.danielrosehill.co.il/myblog/how-to-add-c...
491.
15 of 21 06/07/2020, 21:19 How to Add Custom Keybindings in Openbox | Daniel ... https://www.danielrosehill.co.il/myblog/how-to-add-c...
549. 550. 551.
16 of 21 06/07/2020, 21:19 How to Add Custom Keybindings in Openbox | Daniel ... https://www.danielrosehill.co.il/myblog/how-to-add-c...
607.
POSTED IN LINUX & UBUNTU, TECHNOLOGY • TAGGED CUSTOMIZATION, LINUX, OPENBOX, UBUNTU
If a backup copy of this post exists as a PDF, then it can be found here
OTHER LINKS
19 of 21 06/07/2020, 21:19 How to Add Custom Keybindings in Openbox | Daniel ... https://www.danielrosehill.co.il/myblog/how-to-add-c...
Newsle�er
Wri�ng on Other Sites
Ghostwri�ng
Github
Amazon
Danbuntu 18.04 (LTS)
Contact Me
Contact Me (Anon)
TOP POSTS
Freelance Wri�ng Pricing: Per Word, Per Hour, or Per Project? And How Much Of Each?
How to: Create a Password-Protected WordPress Staging Environment Using So�aculous And Cloudflare Access
My (Unorthodox) Produc�vity Resolu�on For This Year — Be Less ‘Responsive’!
The #weddingofalife�me PR campaign
Ireland vs. Israel: My Thoughts A�er 5 Years
MY RANDOM INTERESTS
Aliexpress ⁄ Amazon ⁄ Android ⁄ AWS ⁄ Backblaze ⁄ backups ⁄ Clonezilla ⁄ Cloud storage ⁄ cooking ⁄ CRM ⁄ cybersecurity ⁄ email ⁄ Facebook ⁄ Freelancing ⁄ GPUs ⁄ Gsuite ⁄ Hardware ⁄ Host4Geeks ⁄ hos�ng ⁄ Ireland ⁄ Israel ⁄ kaizen ⁄
20 of 21 06/07/2020, 21:19 How to Add Custom Keybindings in Openbox | Daniel ... https://www.danielrosehill.co.il/myblog/how-to-add-c...
LinkedIN ⁄ Linux ⁄ marke�ng ⁄ Mental Health ⁄ Monitors ⁄ Mul�monitor ⁄ Mul�ple monitors ⁄ OSINT ⁄ phishing ⁄ Produc�vity ⁄ Quora ⁄ recipes ⁄ Reddit ⁄ reviews ⁄ sales ⁄ shopping ⁄ technology ⁄ TransferWise ⁄ Ubuntu ⁄ WhatsApp ⁄ Worksta�ons ⁄ wri�ng ⁄ Zoho ⁄
FIND POSTS ABOUT:
Search …
21 of 21 06/07/2020, 21:19