Comments (12)
What is the output if you set the environment variable SDL_EVENT_LOGGING=1
?
from sdl.
I disconnected and connected it four times just to check, and the IDs match in both SDL_EVENT_KEYBOARD_ADDED/REMOVED:
With the other keyboard, somehow SDL_EVENT_MOUSE_REMOVED/ADDED is also being sent??? (I connected and disconnected the keyboard once in this case)
from sdl.
Pressing random keys in both keyboards outputs this:
from sdl.
The timestamps in the first screenshot are weird, and in the last screenshot, the windowid starts at 2, but it should start at 1, right?
from sdl.
creating another window increments the ID counter correctly to 3
from sdl.
You can't assume anything about object IDs, other than they'll be non-zero.
from sdl.
I clarified the documentation to reduce confusion, thanks for pointing this out!
from sdl.
FYI, the keyboard ID for key events will only be set when raw input is enabled on Windows.
from sdl.
so key.which is only set on Windows? what about other platforms?
from sdl.
so key.which is only set on Windows? what about other platforms?
It depends on the platform. It's not currently defined when it's available, you should experiment and see what works for you.
from sdl.
I think SDL_WindowID and SDL_DisplayID should have documentation too, just for consistency.
Done!
from sdl.
so key.which is only set on Windows? what about other platforms?
It depends on the platform. It's not currently defined when it's available, you should experiment and see what works for you.
That's a shame, I saw somewhere that multiple keyboard support was added, but it didn't mentioned it was platform dependant xd. Maybe it should be specified in SDL_KeyboardEvent?
from sdl.
Related Issues (20)
- Should RWseek(0, RW_SEEK_CUR) be optimized? HOT 3
- Retrobit Sega Saturn Wireless Contoller has invalid parameters HOT 4
- testcamera does not work on emscripten HOT 2
- [Feature Request] Add Handheld and Custom device capability and feature support
- SDL_DestroyTexture leak memory wayland X11. HOT 2
- SDL3 Android SIGSEGV in `ANDROID_JoystickRumble` after `SDL_Quit` HOT 1
- testffmpeg poor performance HOT 11
- dummy audio driver does not work on emscripten HOT 6
- Memory leaks SDL_stack_alloc/SDL_stack_free HOT 4
- SDL return code -> SDL_bool? HOT 23
- [Windows 10] Most joystick events do not show up unless initalized with SDL_INIT_VIDEO HOT 1
- Clarify initial content of surfaces and textures HOT 1
- make src/libm a static library internal to SDL ? HOT 18
- [Android] mouse - avoid popping out system bars HOT 1
- Remove unused math code from MSVC and Xcode projects
- ios: infinite hang on SDL_malloc HOT 2
- Windows VC Linker error audio_async and sdl audio functions HOT 3
- Bug in SDL_DelayNS() HOT 2
- Game controller support matrix HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sdl.