You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Software for streaming that intentionally runs in the background.
Describe the problem or limitation you are having in your project
Within Linux in particular, keypress inputs are handled by XKB, which only passes input when the Window is in focus. This prevents my software from activating certain features based on global hot keys when it is in the background.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Global hot key combinations, or even media keys, are important to listen to for applications that should be able to operate without focus or minimized. By allowing for key input even when the application is in the background, it can allow for the development of richer, passive applications.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Within Project Settings would be a toggle for Input to allow for a Keylogging mode, which enables input state to be tracked at all times instead of just while the Window is in focus. Input handling in scripts should not have to be changed. In cases where keylogging is enabled but some input should not be handled, users can explicitly add a check in their script to validate that the window has focus before handling the event. For security reasons it should not be enabled by default.
If this enhancement will not be used often, can it be worked around with a few lines of script?
No easily, as it requires implementing a different way of reading input from the system.
Is there a reason why this should be core and not an add-on in the asset library?
While it's possible to design as a native asset using GDExtension to read direct hardware input, it would involve bypassing Godot's core systems and break the patterns for handling input. It would be best to handle this in the platform setup for projects, so that it can be integrated and seamless for application development.
The text was updated successfully, but these errors were encountered:
Describe the project you are working on
Software for streaming that intentionally runs in the background.
Describe the problem or limitation you are having in your project
Within Linux in particular, keypress inputs are handled by XKB, which only passes input when the Window is in focus. This prevents my software from activating certain features based on global hot keys when it is in the background.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Global hot key combinations, or even media keys, are important to listen to for applications that should be able to operate without focus or minimized. By allowing for key input even when the application is in the background, it can allow for the development of richer, passive applications.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Within Project Settings would be a toggle for Input to allow for a Keylogging mode, which enables input state to be tracked at all times instead of just while the Window is in focus. Input handling in scripts should not have to be changed. In cases where keylogging is enabled but some input should not be handled, users can explicitly add a check in their script to validate that the window has focus before handling the event. For security reasons it should not be enabled by default.
If this enhancement will not be used often, can it be worked around with a few lines of script?
No easily, as it requires implementing a different way of reading input from the system.
Is there a reason why this should be core and not an add-on in the asset library?
While it's possible to design as a native asset using GDExtension to read direct hardware input, it would involve bypassing Godot's core systems and break the patterns for handling input. It would be best to handle this in the platform setup for projects, so that it can be integrated and seamless for application development.
The text was updated successfully, but these errors were encountered: