Is it Possible to Suppress Keystrokes?
#1
I'm working on a script for PC installations that takes direct keyboard input (not using the on-screen keyboard). I've been able to build a functional key handler with the tools available (although Shift is a bit of a workaround).

Problem is, any time I'm typing and I hit 's' the Power-down menu descends across the screen, which can really interrupt whatever I'm working on. I type in parentheses and it adjusts the audio volume.

Is there any way to programmatically suppress (or capture) the keystrokes within a script? I know I could disable them all in the XBMC XML, but I don't want to stop them working -- just to pause that functionality while my script is running.
For scripts, script development tools, and documentation, visit my website:
http://www.maskedfox.com/xbmc/
Reply
#2
I think these ones are executed prior to the window being sent the action.

I'm not sure how easy it would be to override these sorts of things, as python is in a different thread, and we don't necessarily wish to wait on it's results (so we can't just take the return value from the script).

Anyone with any ideas?

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
I can certainly see the concern there, and I agree that responsiveness of the C engine has to be top priority.

The only thing I can think of off-hand would be a toggle within the C code that is exposed to Python. Then in my script I could call xbmc.suppressKeystrokes() (or, in all likelihood, a more accurate and descriptive name than that), and then turn them back on before I exit.

Then wherever those actions are processed (outside of the script), they could check to see if they're being suppressed or not.

Of course, I realize that could be an awful lot of effort to implement for one script. I did some searching, and I've never seen anyone else calling for this sort of behavior.
For scripts, script development tools, and documentation, visit my website:
http://www.maskedfox.com/xbmc/
Reply

Logout Mark Read Team Forum Stats Members Help
Is it Possible to Suppress Keystrokes?0