]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/item/inputbox.c
Merge branch 'master' of git://de.git.xonotic.org/xonotic/xonotic-data.pk3dir
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / item / inputbox.c
index cb1b32e8b1c9a4225e9e3bb09885b935e3945491..2d64590306139cc97f1b860ac56c5e7a72de836a 100644 (file)
@@ -96,15 +96,19 @@ float InputBox_keyDown(entity me, float key, float ascii, float shift)
        }
        switch(key)
        {
+               case K_KP_LEFTARROW:
                case K_LEFTARROW:
                        me.cursorPos -= 1;
                        return 1;
+               case K_KP_RIGHTARROW:
                case K_RIGHTARROW:
                        me.cursorPos += 1;
                        return 1;
+               case K_KP_HOME:
                case K_HOME:
                        me.cursorPos = 0;
                        return 1;
+               case K_KP_END:
                case K_END:
                        me.cursorPos = strlen(me.text);
                        return 1;
@@ -115,6 +119,7 @@ float InputBox_keyDown(entity me, float key, float ascii, float shift)
                                me.setText(me, strcat(substring(me.text, 0, me.cursorPos), substring(me.text, me.cursorPos + 1, strlen(me.text) - me.cursorPos - 1)));
                        }
                        return 1;
+               case K_KP_DEL:
                case K_DEL:
                        if(shift & S_CTRL)
                                me.setText(me, "");