enable numeric and shift layouts

This commit is contained in:
Ilia Bozhinov 2019-03-02 15:19:00 +01:00
parent 0a9b99dd76
commit 7d84731f59
2 changed files with 13 additions and 2 deletions

View File

@ -153,8 +153,19 @@ namespace wf
return *window; return *window;
} }
void Keyboard::handle_action(int32_t action) void Keyboard::handle_action(uint32_t action)
{ {
if (action == ABC_TOGGLE)
{
if (current_layout == default_layout.get()) {
set_layout(shift_layout.get());
} else {
set_layout(default_layout.get());
}
}
if (action == NUM_TOGGLE)
set_layout(numeric_layout.get());
} }
} }
} }

View File

@ -71,7 +71,7 @@ namespace wf
static void create(); static void create();
static Keyboard& get(); static Keyboard& get();
void handle_action(int32_t action); void handle_action(uint32_t action);
VirtualKeyboardDevice& get_device(); VirtualKeyboardDevice& get_device();
Gtk::Window& get_window(); Gtk::Window& get_window();
}; };