From: terencehill Date: Fri, 23 May 2014 20:50:59 +0000 (+0200) Subject: Forbid capslock and numlock from being bound in the menu X-Git-Tag: xonotic-v0.8.0~208^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=6c2918a326ce7dcc1a285c48a20d39f0455467a7;p=xonotic%2Fxonotic-data.pk3dir.git Forbid capslock and numlock from being bound in the menu --- diff --git a/qcsrc/menu/xonotic/keybinder.c b/qcsrc/menu/xonotic/keybinder.c index d16e8bb26..66c3486a3 100644 --- a/qcsrc/menu/xonotic/keybinder.c +++ b/qcsrc/menu/xonotic/keybinder.c @@ -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;