Skip to content

Linux / Raspberry Pi Keyboard Edit #143

@mrseudo

Description

@mrseudo

Many Linux and Raspberry Pi users will get an unpleasant surprise if they attempt to access the Desk Accessories (Control-Alt-Esc) or Restart (Control-Alt-F12) because these are often reserved keybindings in Linux, and particularly in LXDE on Raspberry Pi. In LXDE, Control-Esc changes focus to the panel menu. Control-Alt-F12 is particularly nasty since it dumps the host system into a nonexistent terminal resulting in reboot. Since the Pause/Break key also emulates the Reset key, you can get around this little booby trap with Control-Alt-Break. However, if you are using a tiny keyboard, such as on the Raspberry Pi 400, there is no Break key.

The traditional reply to this problem has been "edit your system keybindings." There is no reason to do this. Most Linux users are going to compile GSplus from source anyway, so why not edit the source keymap? Three minor changes can get GSplus working for most Linux users on the tiniest of keyboards. Most of the function keys are hogged by GSplus already. This will swap the Alt and Super keycodes (Command and Option), and assign the Right Control key to the Reset keycode. Remember, the Super key is also known as the Windows, Tux, or Raspberry key on the Pi.

  1. Edit src/adb_keycodes.h.
  2. For the following constants on lines 97, 100, and 151, replace the values as shown:
  kVK_Command                   = 0x3A,

  kVK_Option                    = 0x37,

  kVK_RightControl              = 0x7F, 
  1. Save the file, recompile GSplus.

These will be the new shortcuts for GSplus system controls:

Desk Accessories	LeftCtrl-Super-Esc
Reset				LeftCtrl-RightCtrl
Restart				LeftCtrl-Super-RightCtrl
Self-Test			LeftCtrl-Super-Alt-RightCtrl

Note, if the Super key opens the applications menu for your desktop environment, hold Left Control before you hit Super.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions