github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/sys/freebsd/dev_kbd.txt (about) 1 # Copyright 2021 syzkaller project authors. All rights reserved. 2 # Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. 3 4 include <sys/types.h> 5 include <kbio.h> 6 include <consio.h> 7 include <fcntl.h> 8 9 resource fd_kbd[fd] 10 11 openat$kbd(fd const[AT_FDCWD], file ptr[in, string["/dev/kbd"]], flags flags[open_flags], mode const[0]) fd_kbd 12 13 ioctl$KDGKBMODE(fd fd_kbd, cmd const[KDGKBMODE], arg int32) 14 ioctl$KDSKBMODE(fd fd_kbd, cmd const[KDSKBMODE]) 15 ioctl$KDMKTONE(fd fd_kbd, cmd const[KDMKTONE]) 16 ioctl$KDGETMODE(fd fd_kbd, cmd const[KDGETMODE], arg int32) 17 ioctl$KDSETMODE(fd fd_kbd, cmd const[KDSETMODE]) 18 ioctl$KDSBORDER(fd fd_kbd, cmd const[KDSBORDER]) 19 ioctl$KDGKBSTATE(fd fd_kbd, cmd const[KDGKBSTATE], arg int32) 20 ioctl$KDSKBSTATE(fd fd_kbd, cmd const[KDSKBSTATE]) 21 ioctl$KDENABIO(fd fd_kbd, cmd const[KDENABIO]) 22 ioctl$KDDISABIO(fd fd_kbd, cmd const[KDDISABIO]) 23 ioctl$KIOCSOUND(fd fd_kbd, cmd const[KIOCSOUND]) 24 ioctl$KDGKBTYPE(fd fd_kbd, cmd const[KDGKBTYPE], arg int32) 25 ioctl$KDGETLED(fd fd_kbd, cmd const[KDGETLED], arg int32) 26 ioctl$KDSETLED(fd fd_kbd, cmd const[KDSETLED]) 27 ioctl$KDSETRAD(fd fd_kbd, cmd const[KDSETRAD]) 28 ioctl$KBADDKBD(fd fd_kbd, cmd const[KBADDKBD], arg ptr[in, keyboard_info]) 29 ioctl$KBRELKBD(fd fd_kbd, cmd const[KBRELKBD], arg ptr[in, keyboard_info]) 30 ioctl$KDRASTER(fd fd_kbd, cmd const[KDRASTER], arg ptr[in, scr_size]) 31 ioctl$KDGKBINFO(fd fd_kbd, cmd const[KDGKBINFO], arg ptr[out, keyboard_info]) 32 ioctl$KDSETREPEAT(fd fd_kbd, cmd const[KDSETREPEAT], arg ptr[in, keyboard_repeat]) 33 ioctl$KDGETREPEAT(fd fd_kbd, cmd const[KDGETREPEAT], arg ptr[out, keyboard_repeat]) 34 ioctl$GETFKEY(fd fd_kbd, cmd const[GETFKEY], arg ptr[inout, fkeyarg]) 35 ioctl$SETFKEY(fd fd_kbd, cmd const[SETFKEY], arg ptr[inout, fkeyarg]) 36 ioctl$GIO_SCRNMAP(fd fd_kbd, cmd const[GIO_SCRNMAP], arg ptr[out, scrmap]) 37 ioctl$PIO_SCRNMAP(fd fd_kbd, cmd const[PIO_SCRNMAP], arg ptr[in, scrmap]) 38 ioctl$GIO_KEYMAP(fd fd_kbd, cmd const[GIO_KEYMAP]) 39 ioctl$PIO_KEYMAP(fd fd_kbd, cmd const[PIO_KEYMAP]) 40 ioctl$OGIO_KEYMAP(fd fd_kbd, cmd const[OGIO_KEYMAP], arg ptr[out, okeymap]) 41 ioctl$OPIO_KEYMAP(fd fd_kbd, cmd const[OPIO_KEYMAP], arg ptr[in, okeymap]) 42 ioctl$GIO_DEADKEYMAP(fd fd_kbd, cmd const[GIO_DEADKEYMAP], arg ptr[out, accentmap]) 43 ioctl$PIO_DEADKEYMAP(fd fd_kbd, cmd const[PIO_DEADKEYMAP], arg ptr[in, accentmap]) 44 ioctl$OGIO_DEADKEYMAP(fd fd_kbd, cmd const[OGIO_DEADKEYMAP], arg ptr[out, oaccentmap]) 45 ioctl$OPIO_DEADKEYMAP(fd fd_kbd, cmd const[OPIO_DEADKEYMAP], arg ptr[in, oaccentmap]) 46 ioctl$GIO_KEYMAPENT(fd fd_kbd, cmd const[GIO_KEYMAPENT], arg ptr[inout, keyarg]) 47 ioctl$PIO_KEYMAPENT(fd fd_kbd, cmd const[PIO_KEYMAPENT], arg ptr[in, keyarg]) 48 49 keyboard_info { 50 kb_index int32 51 kb_name array[int8, MAXFK] 52 kb_unit int32 53 kb_type int32 54 kb_config int32 55 kb_flags int32 56 } 57 58 keyboard_repeat { 59 kb_repeat array[int32, 2] 60 } 61 62 fkeyarg { 63 keynum int16 64 keydef array[int8, MAXFK] 65 flen int8 66 } 67 68 okeymap { 69 n_keys int16 70 key array[okeyent_t, NUM_KEYS] 71 } 72 73 okeyent_t { 74 map array[int8, NUM_STATES] 75 spcl flags[special_keys, int8] 76 flgs int8 77 } 78 79 accentmap { 80 n_accs int16 81 acc array[acc_t, NUM_DEADKEYS] 82 } 83 84 acc_t { 85 accchar int32 86 map array[int32, 104] 87 } 88 89 oaccentmap { 90 n_accs int16 91 acc array[oacc_t, NUM_DEADKEYS] 92 } 93 94 oacc_t { 95 accchar int8 96 map array[int8, 104] 97 } 98 99 keyarg { 100 keynum int16 101 key keyent_t 102 } 103 104 keyent_t { 105 map array[int32, NUM_STATES] 106 spcl int8 107 flgs flags[keyent_flags, int8] 108 } 109 110 scrmap { 111 scrmap array[int8, 256] 112 } 113 114 scr_size { 115 scr_size array[int32, 3] 116 } 117 118 keyent_flags = FLAG_LOCK_O, FLAG_LOCK_C, FLAG_LOCK_N 119 special_keys = NOP, LSH, RSH, CLK, NLK, SLK, LALT, BTAB, LCTR, NEXT, F_SCR, L_SCR, F_FN, L_FN, RCTR, RALT, ALK, ASH, META, RBT, DBG, SUSP, SPSC, F_ACC, DGRA, DACU, DCIR, DTIL, DMAC, DBRE, DDOT, DUML, DDIA, DSLA, DRIN, DCED, DAPO, DDAC, DOGO, DCAR, L_ACC, STBY, PREV, PNC, LSHA, RSHA, LCTRA, RCTRA, LALTA, RALTA, HALT, PDWN, PASTE