Custom keyboard shortcuts

Ray Strode halfline at
Tue Sep 13 20:35:12 PDT 2011


On Tue, Sep 13, 2011 at 10:23 AM, Marc Tarin <mt at> wrote:
> Hi everyone !
> I'm currently customizing a Linux From Scratch distribution, using plymouth as a bootsplash.
> I wanted to change the keyboard shortcuts so as to cater to my whims, so I gave a (quick) look at the source code.
> Correct me if I'm wrong :
> - shortcuts are defined in src/libply-splash-core/ply-boot-splash.c and src/libply-splash-core/ply-keyboard.c
There's some debugging stuff there. backspace, enter, and ctrl-c and
ctrl-d are handled in main.c (see set_keyboard() and the callbacks it

> - verbosity, text mode, etc, respond to a "single" keyboard event, such as pressing CTRL and V being identified as the "CTRL-V" character

> It's easy to change the value of a key to match the value of any single ASCII character, but what if I want to use a two or three character combo, such as "ctrl-alt-v" or "a-b"… can that be done without hacking to much into the code ?

It's actually not as straight forward as you would think.  Some
combinations you could get if plymouth supported handling escape
sequences.  There was a discussion about doing that sort of thing in a
thread here:

But I don't think you can get e.g., ctrl-alt-v with standard escape
sequences.  (totally willing to be corrected by someone if i'm wrong

We could set the console keyboard mode with the KDGKBMODE ioctl to get
reports of individual key presses and releases, then we could track
modifiers like Alt internally.

Another option would be to change plymouth to use /dev/input for
keyboard input instead of going through the tty.  That's something
that's been talked about on quite a few occasions in the past.

So not that easy, but  possible given enough typing.


More information about the plymouth mailing list