Go to file
Sam Lantinga 476245564c Use the real device IDs for the X11 master keyboard and pointer
These always exist so they don't really help detect whether a keyboard/mouse is attached. Looking at the slave devices isn't that helpful either, as they're very permissive in what they might send.

For example, on my system with a single mouse and keyboard attached, xinput -list shows:
 Virtual core pointer                    	id=2	[master pointer  (3)]
   - Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
   - Generic USB Mouse                       	id=10	[slave  pointer  (2)]
   - Generic USB Consumer Control            	id=11	[slave  pointer  (2)]
   - KINESIS CORPORATION KB800HM Kinesis Freestyle2 for Mac	id=18	[slave  pointer  (2)]
   - Logitech Gaming Mouse G502 Consumer Control	id=15	[slave  pointer  (2)]
   - Logitech Gaming Mouse G502              	id=17	[slave  pointer  (2)]
 Virtual core keyboard                   	id=3	[master keyboard (2)]
   - Virtual core XTEST keyboard             	id=5	[slave  keyboard (3)]
   - Power Button                            	id=6	[slave  keyboard (3)]
   - Power Button                            	id=7	[slave  keyboard (3)]
   - Sleep Button                            	id=8	[slave  keyboard (3)]
   - Generic USB                             	id=9	[slave  keyboard (3)]
   - Generic USB System Control              	id=12	[slave  keyboard (3)]
   - Generic USB Consumer Control            	id=19	[slave  keyboard (3)]
   - KINESIS CORPORATION KB800HM Kinesis Freestyle2 for Mac	id=20	[slave  keyboard (3)]
   - KINESIS CORPORATION KB800HM Kinesis Freestyle2 for Mac	id=21	[slave  keyboard (3)]
   - Logitech Gaming Mouse G502 Keyboard     	id=13	[slave  keyboard (3)]
   - Logitech Gaming Mouse G502 System Control	id=14	[slave  keyboard (3)]
   - Logitech Gaming Mouse G502 Consumer Control	id=16	[slave  keyboard (3)]
2024-03-23 16:31:00 -07:00
.github Add releaser script + workflow 2024-03-23 21:41:23 +01:00
VisualC visualc: fix sdl3-config.cmake 2024-03-23 21:41:20 +01:00
VisualC-GDK Add time and realtime clock functions 2024-03-19 10:57:36 -07:00
VisualC-WinRT Add time and realtime clock functions 2024-03-19 10:57:36 -07:00
Xcode dmg: fix sdl3-config.cmake 2024-03-23 21:41:20 +01:00
android-project Add flag to registerReceiver on Android 2024-03-10 09:01:07 -07:00
build-scripts Add releaser script + workflow 2024-03-23 21:41:23 +01:00
cmake cmake: build tests against installed SDL prefix 2024-03-23 21:41:20 +01:00
docs Renamed SDL_SizeIO() SDL_GetIOSize() 2024-03-18 00:27:18 -04:00
include Be explicit about the event mouse and keyboard ID 2024-03-23 16:31:00 -07:00
mingw/pkg-support mingw: add pkg-support files (INSTALL.txt and Makefile) 2024-03-23 21:41:20 +01:00
src Use the real device IDs for the X11 master keyboard and pointer 2024-03-23 16:31:00 -07:00
test Be explicit about the event mouse and keyboard ID 2024-03-23 16:31:00 -07:00
wayland-protocols wayland: Add the xdg-foreign-unstable-v2 protocol 2024-03-15 18:30:05 -04:00
.clang-format Add 'wl_list_for_each_safe' to the clang-format macro list 2024-03-14 10:22:23 -04:00
.clang-tidy Fix size of memcpy in SDL_AudioDeviceFormatChangedAlreadyLocked 2023-08-05 14:14:45 -04:00
.editorconfig Fixed formatting for Haiku cc files 2023-01-25 03:03:41 -08:00
.gitignore GDK: Remove old shader sources, unify shader compilation .bats 2024-03-02 10:30:29 -08:00
.wikiheaders-options sdlwiki: SDL3 advises users to include through 'SDL3/SDL.h' 2023-03-21 02:19:19 +01:00
Android.mk Add time and realtime clock functions 2024-03-19 10:57:36 -07:00
BUGS.txt
CMakeLists.txt filesystem: Use high-res file times on more platforms 2024-03-20 11:39:42 -04:00
CREDITS.md docs: Moved CREDITS and INSTALL to markdown format. 2023-11-29 12:31:27 -05:00
INSTALL.md docs: Moved CREDITS and INSTALL to markdown format. 2023-11-29 12:31:27 -05:00
LICENSE.txt Updated copyright for 2024 2024-01-01 13:15:26 -08:00
README-SDL.txt
README.md docs: Convert everything to Unix-style endlines. 2023-11-29 11:29:57 -05:00
WhatsNew.txt Added the environment variable SDL_LOGGING to control default log output 2024-01-27 19:30:22 -08:00

README.md

Simple DirectMedia Layer (SDL) Version 3.0

https://www.libsdl.org/

Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D. It is used by video playback software, emulators, and popular games including Valve's award winning catalog and many Humble Bundle games.

More extensive documentation is available in the docs directory, starting with README.md. If you are migrating to SDL 3.0 from SDL 2.0, the changes are extensively documented in README-migration.md.

Enjoy!

Sam Lantinga (slouken@libsdl.org)