cadadr / pomodorino

A little Pomodoro app
https://www.gkayaalp.com/pomodorino.html
GNU General Public License v3.0
12 stars 1 forks source link

Keybindings #55

Open cadadr opened 3 years ago

cadadr commented 3 years ago

Whether through #40, or through whatever other means PyGObject allows (I gues DBus would be the most likely candidate), keybindings that could control pomodorino would be very useful.

They could be as such: Super+P is the leader key, and the following key indicates the action. So, e.g. Super+P, <Return> is "advance state", Super+P, <Space> is pause/resume, Super+P, <Backspace> is cancel, Super+P, <Escape> is skip break, Super+P, S is settings, etc.

Implementationwise the above might be tricky. Guess Super+P would be the global shortcut, and would result in some call into Pomodorino, which could use maybe an invisible window or something to steal focus for the span of one keydown+keyup event, and act on that key. The global shortcut would be set at the system level, whatever means the DE provides, but the second level keys would be set up in the settings modal, probably in a "keybindings" tab, and get synced to gsettings as an array or something. Each action would have a handler in the App object.