1 // Licensed GNU LGPL v3 or later: http://www.gnu.org/licenses/lgpl.html
2 
3 #ifndef SPECTMORPH_SHORTCUT_HH
4 #define SPECTMORPH_SHORTCUT_HH
5 
6 #include "smwindow.hh"
7 
8 namespace SpectMorph
9 {
10 
11 class Shortcut
12 {
13   Window *window     = nullptr;
14   PuglMod mod        = PuglMod (0);
15   bool    mod_check  = false;
16   uint32_t character = 0;
17 
18 public:
19   Shortcut (Window *window, PuglMod mod, uint32_t character);
20   Shortcut (Window *window, uint32_t character);
21 
22   ~Shortcut();
23 
24   bool focus_override();
25   bool key_press_event (const PuglEventKey& key_event);
26 
27   static void test (Window *window);
28 
29   Signal<> signal_activated;
30 };
31 
32 }
33 
34 #endif
35