src/core/linux/SDL_evdev_kbd.c


Log

Author Commit Date CI Message
Sam Lantinga 9130f7c3 2021-01-02T10:25:38 Updated copyright for 2021
Sam Lantinga 1822f97e 2020-11-11T19:37:47 Fixed bug 5346 - Add FreeBSD evdev KBIO keyboard input driver wahil1976 This patch adds the KBIO text input driver for FreeBSD, which allows text input to fully work without text spilling out into the console. It also supports accented input, AltGr keys and Alt Lock combinations. Tested with US accent keys layout and various AltGr layouts.
Sam Lantinga a8780c6a 2020-01-16T20:49:25 Updated copyright date for 2020
Sam Lantinga 6c4765a1 2019-06-17T11:10:20 Removed extraneous fprintf() call
Sylvain Becker 052b4f29 2019-03-12T14:20:37 SDL_EVDEV_kbd_init: uninitialized data for ioctl (Bug 4530) Only two chars are used but the full prototype is: int tioclinux(struct tty_struct *tty, unsigned long arg) ==5010== Syscall param ioctl(TIOCLINUX) points to uninitialised byte(s) ==5010== at 0x53E73C7: ioctl (syscall-template.S:78) ==5010== by 0x4A887DA: SDL_EVDEV_Init (SDL_evdev.c:163) ==5010== by 0x4A7D157: KMSDRM_VideoInit (SDL_kmsdrmvideo.c:509) ==5010== by 0x497D959: SDL_VideoInit_REAL (SDL_video.c:529) ==5010== by 0x487ACBC: SDL_InitSubSystem_REAL (SDL.c:171) ==5010== by 0x487B052: SDL_Init_REAL (SDL.c:256) ==5010== by 0x488F7D6: SDL_Init (SDL_dynapi_procs.h:85)
Sam Lantinga 5e13087b 2019-01-04T22:01:14 Updated copyright for 2019
Sam Lantinga 9af581bd 2018-10-31T15:01:20 Fixed bug 4347 - Keyboard LEDs don't work on linux console Rainer Sabelka When using SLD2 on a Linux console with the KMS/DRM video backend and Linux evdev keyboard support, the caps lock, scroll lock, and num lock leds do not work. The attached patch adds ioctls for setting the LED state in SDL_evdev_kbd.c
Ryan C. Gordon 93fb710a 2018-10-03T16:54:24 evdev: Don't initialize struct sigaction with "{ 0 }". It causes warnings on some platforms, depending on the actual definition of sigaction, and since this is static data, it'll be zero'd out anyhow.
Ryan C. Gordon f59b0056 2018-08-07T16:56:46 evdev: On sudden termination, make sure keyboard isn't lost (thanks, Tadek!) "In release 2.0.6, when Linux evdev keyboard support has been moved to a separate source file, a feature was added to disable normal keyboard event processing to prevent "spilling" keystrokes to background virtual console. This feature has one unpleasant side effect: if application fails to call `SDL_Exit` before termination or crashes with fatal signal, console is left in unusable state with keyboard not working and no possibility to switch virtual console. If user has a chance, he can login remotely and restore keyboard with `kbd_mode`, otherwise the only option is to reboot the machine. This patch fixes that problem by intercepting fatal signals (with `sigaction`) and process termination (with `atexit`), to restore keyboard state, if it wasn't properly restored with `SDL_Exit`. The function registered with `atexit` also restores original signal handlers, to prevent leaving invalid handlers after SDL library is unloaded, if it was loaded dynamically with `dlopen`. No signal handlers or `atexit` function are installed if SDL boolean hint `SDL_HINT_NO_SIGNAL_HANDLERS` is `SDL_TRUE`. Additionally, if environment variable `SDL_INPUT_LINUX_KEEP_KBD` exists, keyboard initialization function completely skips disabling keyboard. This can be useful for debugging." Fixes Bugzilla #4193.
Sam Lantinga 9924a8e3 2018-06-14T00:51:45 Fixed bug 4094 - No SDL_TEXTEDITING after pressing Alt key on Raspberry Pi Linux This was reproducible by running an SDL app on the console from an ssh login. In this case the terminal wasn't owned by the user running the app, so we were using the default keymap, which didn't have state transitions defined for ctrl and alt, so once we entered that state keypresses would no longer transition out of that state, nor would they generate text. As a workaround, we'll just reset to the default shift state if that happens, which means we'll get text for keys pressed while ctrl is held down, but I don't think that's a big problem. Note that in this case we also can't mute the keyboard, so the keypresses go to the console, which probably isn't what you want...
Sam Lantinga e3cc5b2c 2018-01-03T10:03:25 Updated copyright for 2018
Brandon Schaefer be005b7c 2017-07-28T12:00:10 evdev: Fix 'Syscall param ioctl(TIOCLINUX) points to uninitialised byte' https://pastebin.com/raw/tQjG0kG0
Sam Lantinga e0a40fb6 2017-01-09T02:54:42 Implemented full evdev keyboard text support This is based on the Linux kernel driver, and has fallback mapping tables in case we aren't connected to a virtual terminal.