hkbd(4): add some extra handy fn key bindings
- Fn+S for ScrollLock as it's very useful to have ScrollLock on FreeBSD's TTY. - Fn+P for PrtSc/SysRq, as it's another very handy but sadly missing key on Macbooks. - Some other Fn+<key> combinations duplicating existing keys. Apply the change to ukbd(4) as well. Signed-off-by: Toby Slight <tslight@pm.me> Reviewed by: wulf MFC after: 1 month Pull Request: https://github.com/freebsd/freebsd-src/pull/1998
This commit is contained in:
committed by
Vladimir Kondratyev
parent
103325323c
commit
bb8230f838
@@ -623,6 +623,16 @@ static uint32_t
|
||||
hkbd_apple_fn(uint32_t keycode)
|
||||
{
|
||||
switch (keycode) {
|
||||
case 0x0b: return 0x50; /* H -> LEFT ARROW */
|
||||
case 0x0d: return 0x51; /* J -> DOWN ARROW */
|
||||
case 0x0e: return 0x52; /* K -> UP ARROW */
|
||||
case 0x0f: return 0x4f; /* L -> RIGHT ARROW */
|
||||
case 0x36: return 0x4a; /* COMMA -> HOME */
|
||||
case 0x37: return 0x4d; /* DOT -> END */
|
||||
case 0x18: return 0x4b; /* U -> PGUP */
|
||||
case 0x07: return 0x4e; /* D -> PGDN */
|
||||
case 0x16: return 0x47; /* S -> SCROLLLOCK */
|
||||
case 0x13: return 0x46; /* P -> SYSRQ/PRTSC */
|
||||
case 0x28: return 0x49; /* RETURN -> INSERT */
|
||||
case 0x2a: return 0x4c; /* BACKSPACE -> DEL */
|
||||
case 0x50: return 0x4a; /* LEFT ARROW -> HOME */
|
||||
|
||||
@@ -677,6 +677,16 @@ static uint32_t
|
||||
ukbd_apple_fn(uint32_t keycode)
|
||||
{
|
||||
switch (keycode) {
|
||||
case 0x0b: return 0x50; /* H -> LEFT ARROW */
|
||||
case 0x0d: return 0x51; /* J -> DOWN ARROW */
|
||||
case 0x0e: return 0x52; /* K -> UP ARROW */
|
||||
case 0x0f: return 0x4f; /* L -> RIGHT ARROW */
|
||||
case 0x36: return 0x4a; /* COMMA -> HOME */
|
||||
case 0x37: return 0x4d; /* DOT -> END */
|
||||
case 0x18: return 0x4b; /* U -> PGUP */
|
||||
case 0x07: return 0x4e; /* D -> PGDN */
|
||||
case 0x16: return 0x47; /* S -> SCROLLLOCK */
|
||||
case 0x13: return 0x46; /* P -> SYSRQ/PRTSC */
|
||||
case 0x28: return 0x49; /* RETURN -> INSERT */
|
||||
case 0x2a: return 0x4c; /* BACKSPACE -> DEL */
|
||||
case 0x50: return 0x4a; /* LEFT ARROW -> HOME */
|
||||
|
||||
Reference in New Issue
Block a user