Is was wondering if there is a way or a script that allows me to disable a specific keyboard key like the windows button. (Ex: No matter how many times you presses the windows button it wont go straight to the desktop.)
How to disable a Keyboard key
RGSS3 Script RequestsSorry, but no chance. That is a windows function where you as a developer don't have any access, no matter what program you use.
In some windows version the USER can disable that function under the program's compatibility settings, but in newer windows version even that option (needed for very old windows programs) has been removed.
In some windows version the USER can disable that function under the program's compatibility settings, but in newer windows version even that option (needed for very old windows programs) has been removed.
I didn't read this thoroughly but is this a possible approach
http://stackoverflow.com/questions/3361109/how-can-i-disable-windows-key-in-c
I wouldn't go that way unless you really know what you're doing.
That approach edits the windows registry to disable the key, and needs another registry edit to enable it again - and a comment in it warns that the user might need to restart windows before the key functions again...
I don't know if ruby even allows for editing the registry (which would break the sandbox of the program) or if you need to access other parts of the Window API to get that done.
Not to say that many scripters probably don't know enough of the registry structure to be able to work with these commands without risking a complete breakdown of the system...
Original thread: https://forums.rpgmakerweb.com/threads/how-to-disable-a-keyboard-key.17579/