]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/xonotic/keybinder.c
Merge remote-tracking branch 'origin/sev/menu_skinlist_titles'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / keybinder.c
index 739be1b056aa908da09d5ab1bfded18f3ef30708..66c3486a3a91c22747a646153d64d181f4f14302 100644 (file)
@@ -34,7 +34,7 @@ void KeyBinder_Bind_Edit(entity btn, entity me);
 
 #ifdef IMPLEMENTATION
 
-string KEY_NOT_BOUND_CMD = "// not bound";
+const string KEY_NOT_BOUND_CMD = "// not bound";
 
 #define MAX_KEYS_PER_FUNCTION 2
 #define MAX_KEYBINDS 256
@@ -143,6 +143,13 @@ void XonoticKeyBinder_keyGrabbed(entity me, float key, float ascii)
        if(key == K_ESCAPE)
                return;
 
+       // forbid these keys from being bound in the menu
+       if(key == K_CAPSLOCK || key == K_NUMLOCK)
+       {
+               KeyBinder_Bind_Change(me, me);
+               return;
+       }
+
        func = Xonotic_KeyBinds_Functions[me.selectedItem];
        if(func == "")
                return;