XFCE keyboard shortcuts
Change default keyboard bindings in XFCE
- Lock xfce with Windows + L
- Disable emoji annotation (IBus Preferences)
- Show desktop with Windows + D
- Snap Windows to sides
- Open Whisker menu with Windows key
Lock xfce with Windows + L
Default settings
To lock a screen in Xfce by default either:
- Type
xflock4
in the terminal - Press
Ctrl + Alt + L
Because the Windows key is basically useless on Linux, I want to bind some shortcuts to it.
Change keyboard shortcut
1. To change Keyboard shortcuts, open Settings Manager
--> Keyboard
--> Application Shortcuts
. There you will be able to see all current shortcuts.
2. To add a new one, press the Add
button at the bottom, type the name of the command you would like to launch with that shortcut and press OK
. You will then be prompted to press the desired key combination. I am used to Windows + L
, so I set it that way.
3. Delete the previous shortcut Ctrl + Alt + L or keep it.
Disable emoji annotation (IBus Preferences)
I have recently found out that the key combination Ctrl + Shift + E
in my Xfce Debian 11 does something else than I expected. I use it in Bookstack to change a selected part of text to inline code style like this
. Instead of this however, it calls an Emoji annotation (which, frankly, I will never use).
1. To disable this shortcut, open ibus-setup
(Applications
--> Run program
or type ibus-setup
in Terminal
).
2. This will open IBus Preferences
, go to the Emoji
tab
3. There, click on the three dots button next to Emoji annotation,
select the shortcut and press Delete
.
4. The Emoji annotation
should now be empty and shouldn't interfere with other application shortcuts.
Show desktop with Windows + D
Again, Ctrl + Alt + D
is set as a default shortcut to show desktop. Unfortunately I haven't found it in the Keyboard shortcut settings, so I will have to use the more advanced Settings Editor
.
1. Settings Manager
--> Settings Editor
2. Find Channel xfce4-keyboard-shortcuts
and locate a Property with show_desktop_key
value.
3. Click on this Property and press the Reset button. This will basically delete the Property and Ctrl + Alt + D
won't work for showing the desktop anymore.
4. Now add a new Property /xfwm4/custom/<Super>d
with the same Value (show_desktop_key)
and Type String
5. Click Save and that's it.
Windows + d
will now work.
Snap Windows to sides
If you are coming from Windows, you might be familiar with the concept of snapping windows to the left/right side of the screen or to the corners. This is possible within Xfce as well, albeit not as smooth. Without shortcuts, this works by dragging windows to the part of the screen you want it to snap to.
1. Go to Settings Manager
--> Window Manager
2. Open it and go the the Keyboard tab. "Tile window to the X
" is the setting you are looking for, click Edit and change it to what suits you.
Open Whisker menu with Windows key
EDIT: There's bug in Xfce (or maybe a feature) that makes it impossible to use shortcuts with only one modifier key, in this case the Windows key. Basically, if you have a keyboard shortcut that uses the Windows/Super key, e.g Super + Up
and then you make Super
alone open the Whisker menu (or something else), Super + Up
shortcut stops working! To fix this, check the bottom of the article.
If you come from Windows, you are very likely used to pressing the Windows button and typing a name of an application to launch it. You can achieve the same with Xfce's Whisker menu. Unfortunately it isn't called with the Windows
(Super
on non-Windows OSs) key by default. You can change it of course, it's Linux!
1. Go to Settings Manager
--> Keyboard
--> Application Shortcuts
2. Click the Add button and point it to xfce4-popup-whiskermenu
3. Click OK and press your desired key combination (only the Super
key in my case).
Done! Pressing the Super/Windows key will now bring up Whisker menu and you can start typing immediately to launch an app you want.
As mentioned at the beginning of this article, there's a problem with using only one modifier key alone as a shortcut, which makes (most) other shortcuts using this modifier key stop working. You will have to download this utility to fix it: https://github.com/hanschen/ksuperkey
Unfortunately I haven't made this working yet and decided dropping this shortcut for now.