1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 06:27:45 +00:00

Chess: Change keyboard shortcuts

Use some better keyboard shortcuts that make more sense and are more
common, instead of random function keys.
This commit is contained in:
AnicJov 2020-12-10 16:30:33 +01:00 committed by Andreas Kling
parent a2879f53c8
commit b000a884c8

View file

@ -100,15 +100,15 @@ int main(int argc, char** argv)
app_menu.add_action(GUI::Action::create("Resign", { Mod_None, Key_F3 }, [&](auto&) { app_menu.add_action(GUI::Action::create("Resign", { Mod_None, Key_F3 }, [&](auto&) {
widget.resign(); widget.resign();
})); }));
app_menu.add_action(GUI::Action::create("Flip Board", { Mod_None, Key_F4 }, [&](auto&) { app_menu.add_action(GUI::Action::create("Flip Board", { Mod_Ctrl, Key_F }, [&](auto&) {
widget.flip_board(); widget.flip_board();
})); }));
app_menu.add_separator(); app_menu.add_separator();
app_menu.add_action(GUI::Action::create("Import PGN...", { Mod_None, Key_F6 }, [&](auto&) { app_menu.add_action(GUI::Action::create("Import PGN...", { Mod_Ctrl, Key_O }, [&](auto&) {
GUI::MessageBox::show(window, "Feature not yet available.", "TODO", GUI::MessageBox::Type::Information); GUI::MessageBox::show(window, "Feature not yet available.", "TODO", GUI::MessageBox::Type::Information);
})); }));
app_menu.add_action(GUI::Action::create("Export PGN...", { Mod_None, Key_F7 }, [&](auto&) { app_menu.add_action(GUI::Action::create("Export PGN...", { Mod_Ctrl, Key_S }, [&](auto&) {
Optional<String> export_path = GUI::FilePicker::get_save_filepath(window, "Untitled", "pgn"); Optional<String> export_path = GUI::FilePicker::get_save_filepath(window, "Untitled", "pgn");
if (!export_path.has_value()) if (!export_path.has_value())