Lines Matching +full:mode +full:- +full:flag

1 /* SPDX-License-Identifier: GPL-2.0 */
12 * kbd->xxx contains the VC-local things (flag settings etc..)
23 /* 8 modifiers - the names do not have any meaning at all;
25 #define VC_SHIFTLOCK KG_SHIFT /* shift lock mode */
26 #define VC_ALTGRLOCK KG_ALTGR /* altgr lock mode */
27 #define VC_CTRLLOCK KG_CTRL /* control lock mode */
28 #define VC_ALTLOCK KG_ALT /* alt lock mode */
29 #define VC_SHIFTLLOCK KG_SHIFTL /* shiftl lock mode */
30 #define VC_SHIFTRLOCK KG_SHIFTR /* shiftr lock mode */
31 #define VC_CTRLLLOCK KG_CTRLL /* ctrll lock mode */
32 #define VC_CTRLRLOCK KG_CTRLR /* ctrlr lock mode */
41 #define VC_SCROLLOCK 0 /* scroll-lock mode */
42 #define VC_NUMLOCK 1 /* numeric lock mode */
43 #define VC_CAPSLOCK 2 /* capslock mode */
44 #define VC_KANALOCK 3 /* kanalock mode */
46 unsigned char kbdmode:3; /* one 3-bit value */
48 #define VC_MEDIUMRAW 1 /* medium raw (keycode) mode */
49 #define VC_RAW 2 /* raw (scancode) mode */
50 #define VC_UNICODE 3 /* Unicode mode */
51 #define VC_OFF 4 /* disabled mode */
54 #define VC_APPLIC 0 /* application key mode */
55 #define VC_CKMODE 1 /* cursor key mode */
57 #define VC_CRLF 3 /* 0 - enter sends CR, 1 - enter sends CRLF */
58 #define VC_META 4 /* 0 - meta, 1 - meta=prefix with ESC */
72 static inline int vc_kbd_mode(struct kbd_struct * kbd, int flag) in vc_kbd_mode() argument
74 return ((kbd->modeflags >> flag) & 1); in vc_kbd_mode()
77 static inline int vc_kbd_led(struct kbd_struct * kbd, int flag) in vc_kbd_led() argument
79 return ((kbd->ledflagstate >> flag) & 1); in vc_kbd_led()
82 static inline void set_vc_kbd_mode(struct kbd_struct * kbd, int flag) in set_vc_kbd_mode() argument
84 kbd->modeflags |= 1 << flag; in set_vc_kbd_mode()
87 static inline void set_vc_kbd_led(struct kbd_struct * kbd, int flag) in set_vc_kbd_led() argument
89 kbd->ledflagstate |= 1 << flag; in set_vc_kbd_led()
92 static inline void clr_vc_kbd_mode(struct kbd_struct * kbd, int flag) in clr_vc_kbd_mode() argument
94 kbd->modeflags &= ~(1 << flag); in clr_vc_kbd_mode()
97 static inline void clr_vc_kbd_led(struct kbd_struct * kbd, int flag) in clr_vc_kbd_led() argument
99 kbd->ledflagstate &= ~(1 << flag); in clr_vc_kbd_led()
102 static inline void chg_vc_kbd_lock(struct kbd_struct * kbd, int flag) in chg_vc_kbd_lock() argument
104 kbd->lockstate ^= 1 << flag; in chg_vc_kbd_lock()
107 static inline void chg_vc_kbd_slock(struct kbd_struct * kbd, int flag) in chg_vc_kbd_slock() argument
109 kbd->slockstate ^= 1 << flag; in chg_vc_kbd_slock()
112 static inline void chg_vc_kbd_mode(struct kbd_struct * kbd, int flag) in chg_vc_kbd_mode() argument
114 kbd->modeflags ^= 1 << flag; in chg_vc_kbd_mode()
117 static inline void chg_vc_kbd_led(struct kbd_struct * kbd, int flag) in chg_vc_kbd_led() argument
119 kbd->ledflagstate ^= 1 << flag; in chg_vc_kbd_led()