SafeEyes
SafeEyes copied to clipboard
Enable MediaKeys pass through
Hi there,
Although mentioned here https://github.com/slgobinath/SafeEyes/issues/103 (and closed), Media Keys were not passed-through. Is that intentional?
Regardless, would you consider adding that?
Not intentional but this is a feature I also looking for :-) Earlier I found it something hard to achieve according to the current implementation but will consider again.
Isn't there a
'catch' keystroke, if X in []: ; send_key_globally(x)
?
(really rough lines from python/curses and some windows AHK scripting)
I don't know whether there is a send_key_globally or similar function.
FYI: This is how the Skip and Postpone shortcuts are handled by Safe Eyes: https://github.com/slgobinath/SafeEyes/blob/master/safeeyes/BreakScreen.py#L229
Not python code per se (quick search reveals that it is kinda-of problematic in Unix), but you could execute xdotool https://askubuntu.com/questions/218496/sending-keyboard-commands-to-ubuntu-through-python-remote-for-my-blackberry
really looking forward to this improvement
Yes, sending some keys is hard, however it may be easier to use MPRIS interface.
Implemented in #295. Now there is a new plugin named: Media Control which supports pausing currently playing media players using dbus calls.
According to this implementation, if there is a media player playing while you take a break, you will get a pause button on the top right corner as shown in these screenshots. Currently, I have implemented only the Pause button assuming this is the most wanted option.

Well, certainly a much different angle than the one expected.
However, if/when I finish this one, I will still push it (as I feel it would be much more useful than re-inventing the wheel)
@stdedos definitely +1 for your direction. If that works, we can remove this plugin.