Pages
User Documentation
On this page

Keyboard actions

Keyboard actions are actions the system triggers when you press a key. Most should be set by default the way you want them. This page helps you with your own settings. The most prominent examples are the "raise audio volume" key and its siblings, "lower audio volume" and "mute audio", on some multimedia keyboards.

Background

When you press a key, an electronic signal goes over the USB or PS/2 port to the computer. There it's received by the Linux kernel and forwarded to the X Window System. The X Window System receives the scancodes of the keys being pressed and maps them to key events, for example XF86AudioMute. To change this mapping, use the xmodmap command. To see what a key press causes, use the xev command.

Example: the Audio Mute button

If your keyboard's Audio Mute button doesn't work, first find out whether it really triggers the right X Window System event. Open a console and enter:

xev

Move your mouse into the window that opens. Keep your console in view and press the key. You'll see output like this on your console:

KeyRelease event, serial 35, synthetic NO, window 0x4000001,
    root 0x15a, subw 0x4000002, time 63106815, (43,37), root:(1279,877),
    state 0x10, keycode 121 (keysym 0x1008ff12, XF86AudioMute), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

This means your key triggers the event XF86AudioMute. Now open the Shortcuts module in System Settings. Find the audio mute action, click Add New, and press the key you want to use to mute your audio.

Adapted for SonicDE from userbase.kde.org/Tutorials/Keyboard by KDE UserBase contributors, licensed under CC BY-SA 4.0.

Edit this page on GitHub

We use cookies to personalize content and to analyze our traffic. Please decide if you are willing to accept cookies from our website.