Skip to content

Instantly share code, notes, and snippets.

@kriansa
Created April 15, 2019 03:00
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kriansa/88816661b6642ec4477adb7dc790e487 to your computer and use it in GitHub Desktop.
Save kriansa/88816661b6642ec4477adb7dc790e487 to your computer and use it in GitHub Desktop.
XKB keyboard multimedia function keys
# Append this content to the file /usr/share/X11/xkb/rules/evdev
#
# Custom options patch by Kriansa
! option = symbols
custom:multimedia_fn_keys = +media(multimedia_fn_keys)
custom:scroll_lock_key_usable = +media(scroll_lock_key_usable)
// Copy this file to /usr/share/X11/xkb/symbols/media
//
// Make Scroll Lock usable by turning it into a function key
partial modifier_keys xkb_symbols "scroll_lock_key_usable" {
key <SCLK> { [ F13 ] };
};
// Make multimedia keys available on the Function keys, without fn
partial modifier_keys xkb_symbols "multimedia_fn_keys" {
key <FK01> { [ XF86AudioMute ] };
key <FK02> { [ XF86AudioLowerVolume ] };
key <FK03> { [ XF86AudioRaiseVolume ] };
key <FK04> { [ XF86AudioPlay ] };
key <FK05> { [ XF86AudioStop ] };
key <FK06> { [ XF86AudioPrev ] };
key <FK07> { [ XF86AudioNext ] };
};