diff options
author | H. Peter Anvin <hpa@zytor.com> | 2014-04-20 11:35:47 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2014-04-20 11:46:59 -0700 |
commit | 81609df52ac52636a6d4af9249ede641620cb3a7 (patch) | |
tree | d9977268d435834ab26ccebb4ad28a2b3d44e50b /core | |
parent | b8752b88492d8f321037ad29e56a2fdf9e798e15 (diff) | |
download | syslinux-81609df52ac52636a6d4af9249ede641620cb3a7.tar.gz syslinux-81609df52ac52636a6d4af9249ede641620cb3a7.tar.xz syslinux-81609df52ac52636a6d4af9249ede641620cb3a7.zip |
Centralize shift_is_held(), make it work to force the command linesyslinux-6.03-pre11
Holding down shift is supposed to force a command line unless noescape
is provided; make it behave that way.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'core')
-rw-r--r-- | core/include/core.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/core/include/core.h b/core/include/core.h index c8689dfd..4783d75f 100644 --- a/core/include/core.h +++ b/core/include/core.h @@ -130,6 +130,15 @@ extern void writechr(char data); extern void crlf(void); extern int pollchar(void); extern char getchar(char *hi); +extern uint8_t kbd_shiftflags(void); +static inline bool shift_is_held(void) +{ + return !!(kbd_shiftflags() & 0x5d); /* Caps/Scroll/Alt/Shift */ +} +static inline bool ctrl_is_held(void) +{ + return !!(kbd_shiftflags() & 0x04); /* Only Ctrl */ +} extern void cleanup_hardware(void); extern void sirq_cleanup(void); |