raphael / linux-samus

Linux 4.16 on Chromebook Pixel 2015
GNU General Public License v2.0
181 stars 36 forks source link

Add keyboard.sh script #177

Closed cernekee closed 7 years ago

cernekee commented 7 years ago

This enables Chrome OS-style key mappings for Home/End/PgUp/... and allows the use of Search+VolumeUp, Search+BrightnessDown, and similar special key combinations. The script was adapted from the crouton project.

raphael commented 7 years ago

Very nice! thank you.

wulvyrn commented 7 years ago

How does one add mod +alt for the led keyboard brightness?

cernekee commented 7 years ago

How does one add mod +alt for the led keyboard brightness?

What worked for me was to add these lines to ~/.xkb/symbols/chromebook:

    // Search + [ ] for keyboard brightness (local mod)
    key <AD11> { overlay1=<I237> }; // XF86KbdBrightnessDown
    key <AD12> { overlay1=<I238> }; // XF86KbdBrightnessUp

Xfce knew what to do with these keycodes; did not test with other desktop environments.

This isn't a very nice solution though, since it should use Alt+Search+F6/F7 for consistency. It might require some additional work to make that happen without breaking other uses of Alt. I noticed that the crouton keymap also does not map Alt+Backspace to Delete, as Chrome OS does. This might be for similar reasons, or maybe it is just to avoid conflicting with apps that map Alt+Backspace to some other function.

Additionally, on Chrome OS, powerd manages the keyboard backlight timeout and nifty features like "keyboard backlight turns off while playing movies" so we're currently missing that functionality on Linux.

wulvyrn commented 7 years ago

thanks, i'm using i3 and it has no idea what to with XF86 keycodes.