summaryrefslogtreecommitdiff
path: root/src/Fl_System_Driver.cxx
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-03-15 06:42:06 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-08-29 12:15:32 +0200
commitc720aae51515907ae82ee02df80bd084f291d4b1 (patch)
tree7fbf3569f35966891df68490b047b30c9ec20bcd /src/Fl_System_Driver.cxx
parent28981f6fd3971aaf7ff6527ee1cdeb9d886c4a4a (diff)
Make hybrid Wayland/X11 platform.
Diffstat (limited to 'src/Fl_System_Driver.cxx')
-rw-r--r--src/Fl_System_Driver.cxx19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/Fl_System_Driver.cxx b/src/Fl_System_Driver.cxx
index ee5e990ce..44b47bc7c 100644
--- a/src/Fl_System_Driver.cxx
+++ b/src/Fl_System_Driver.cxx
@@ -83,11 +83,30 @@ static Fl_System_Driver::Keyname default_key_table[] = {
{FL_Delete, "Delete"}
};
+
+int Fl_System_Driver::command_key = 0;
+int Fl_System_Driver::control_key = 0;
+
+
+int fl_command_modifier() {
+ if (!Fl_System_Driver::command_key) Fl::system_driver();
+ return Fl_System_Driver::command_key;
+}
+
+
+int fl_control_modifier() {
+ if (!Fl_System_Driver::control_key) Fl::system_driver();
+ return Fl_System_Driver::control_key;
+}
+
+
Fl_System_Driver::Fl_System_Driver()
{
// initialize default key table (used in fl_shortcut.cxx)
key_table = default_key_table;
key_table_size = sizeof(default_key_table)/sizeof(*default_key_table);
+ command_key = FL_CTRL;
+ control_key = FL_META;
}
Fl_System_Driver::~Fl_System_Driver()