aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2025-04-03 02:26:08 +0200
committerdec05eba <dec05eba@protonmail.com>2025-04-03 02:26:08 +0200
commit46962ea3fc83a26fcf0851ccb748b08eecf7f8e8 (patch)
tree5de56b0e34ecc78bc680a9f96b777dc87e1de965
parentf7a14756eef9277175ded1fd10901b307fafb291 (diff)
Add f23 and f24HEADmaster
-rw-r--r--include/mgl/window/key.h2
-rw-r--r--src/window/key.c4
-rw-r--r--src/window/window.c2
3 files changed, 8 insertions, 0 deletions
diff --git a/include/mgl/window/key.h b/include/mgl/window/key.h
index 722a80a..befd65a 100644
--- a/include/mgl/window/key.h
+++ b/include/mgl/window/key.h
@@ -129,6 +129,8 @@ typedef enum {
MGL_KEY_F20,
MGL_KEY_F21,
MGL_KEY_F22,
+ MGL_KEY_F23,
+ MGL_KEY_F24,
/* This should always be the last key */
__MGL_NUM_KEYS__
diff --git a/src/window/key.c b/src/window/key.c
index b68270a..ffef2b4 100644
--- a/src/window/key.c
+++ b/src/window/key.c
@@ -127,6 +127,8 @@ const char* mgl_key_to_string(mgl_key key) {
case MGL_KEY_F20: return "F20";
case MGL_KEY_F21: return "F21";
case MGL_KEY_F22: return "F22";
+ case MGL_KEY_F23: return "F23";
+ case MGL_KEY_F24: return "F24";
case __MGL_NUM_KEYS__: return "";
}
return "";
@@ -206,6 +208,8 @@ uint64_t mgl_key_to_x11_keysym(mgl_key key) {
case MGL_KEY_F20: return XK_F20;
case MGL_KEY_F21: return XK_F21;
case MGL_KEY_F22: return XK_F22;
+ case MGL_KEY_F23: return XK_F23;
+ case MGL_KEY_F24: return XK_F24;
default: return XK_VoidSymbol;
}
return XK_VoidSymbol;
diff --git a/src/window/window.c b/src/window/window.c
index e7f737d..55efffd 100644
--- a/src/window/window.c
+++ b/src/window/window.c
@@ -1170,6 +1170,8 @@ static mgl_key x11_keysym_to_mgl_key(KeySym key_sym) {
case XK_F20: return MGL_KEY_F20;
case XK_F21: return MGL_KEY_F21;
case XK_F22: return MGL_KEY_F22;
+ case XK_F23: return MGL_KEY_F23;
+ case XK_F24: return MGL_KEY_F24;
}
return MGL_KEY_UNKNOWN;
}