]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Forbid capslock and numlock from being bound in the menu
authorterencehill <piuntn@gmail.com>
Fri, 23 May 2014 20:50:59 +0000 (22:50 +0200)
committerterencehill <piuntn@gmail.com>
Fri, 23 May 2014 20:50:59 +0000 (22:50 +0200)
qcsrc/menu/xonotic/keybinder.c

index d16e8bb26ede658e06ded51df4cf0fe5ddce36d5..66c3486a3a91c22747a646153d64d181f4f14302 100644 (file)
@@ -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;