Listen for keyboard events from OS (Operating System).
- Linux
- ✔️ X11
- ❌ Wayland
- ✔️ Applications running with XWayland
- ✔️ Windows
- ❌ MacOS
Why only keyboard events? No reason, I could add others.
Prerequisites: PREREQUISITES.md
git clone --filter=blob:none --recurse-submodules https://github.com/thiagola92/os-listener.gitcd godot-cpp
godot --dump-extension-api
scons platform=linux custom_api_file=extension_api.json
cd ..
scons platform=linux # Debug
scons platform=linux target=template_release # ReleaseBinaries will be located at demo/bin.
cd godot-cpp
.\godot.exe --dump-extension-api
python -m SCons platform=windows custom_api_file=extension_api.json
cd ..
python -m SCons platform=windows # Debug
python -m SCons platform=windows target=template_release # ReleaseBinaries will be located at demo/bin.
WARNING: Needs Emscripten installed and in your PATH (check by writing emcc in the terminal).
scons platform=web threads=no # Debug
scons platform=web threads=no target=template_release # ReleaseNOTE: Not about GDExtension for web but it can help: https://docs.godotengine.org/en/stable/contributing/development/compiling/compiling_for_web.html#doc-compiling-for-web