if (key == K_PGUP || key == K_KP_PGUP || key == K_MWHEELUP)
{
con_backscroll += ((int) vid_conheight.integer >> 5);
- if (con_backscroll > con_totallines - (vid_conheight.integer>>3) - 1)
- con_backscroll = con_totallines - (vid_conheight.integer>>3) - 1;
return;
}
if (key == K_PGDN || key == K_KP_PGDN || key == K_MWHEELDOWN)
{
con_backscroll -= ((int) vid_conheight.integer >> 5);
- if (con_backscroll < 0)
- con_backscroll = 0;
return;
}
if (key == K_HOME || key == K_KP_HOME)
{
if (keydown[K_CTRL])
- con_backscroll = con_totallines - (vid_conheight.integer>>3) - 1;
+ con_backscroll = INT_MAX;
else
key_linepos = 1;
return;
char chat_buffer[MAX_INPUTLINE];
unsigned int chat_bufferlen = 0;
+extern int Nicks_CompleteChatLine(char *buffer, size_t size, unsigned int pos);
+
static void
Key_Message (int key, char ascii)
{
return;
}
+ if(key == K_TAB) {
+ chat_bufferlen = Nicks_CompleteChatLine(chat_buffer, sizeof(chat_buffer), chat_bufferlen);
+ return;
+ }
+
if (chat_bufferlen == sizeof (chat_buffer) - 1)
return; // all full
Z_Free (keybindings[bindmap][keynum]);
keybindings[bindmap][keynum] = NULL;
}
+ if(!binding[0]) // make "" binds be removed --blub
+ return;
// allocate memory for new binding
l = strlen (binding);
newbinding = (char *)Z_Malloc (l + 1);
Key_WriteBindings (qfile_t *f)
{
int i, j;
+ char bindbuf[MAX_INPUTLINE];
+ const char *p;
for (j = 0; j < MAX_BINDMAPS; j++)
{
for (i = 0; i < (int)(sizeof(keybindings[0])/sizeof(keybindings[0][0])); i++)
{
- if (keybindings[j][i])
+ p = keybindings[j][i];
+ if (p)
{
+ Cmd_QuoteString(bindbuf, sizeof(bindbuf), p, "\"\\");
if (j == 0)
- FS_Printf(f, "bind %s \"%s\"\n", Key_KeynumToString (i), keybindings[j][i]);
+ FS_Printf(f, "bind %s \"%s\"\n", Key_KeynumToString (i), bindbuf);
else
- FS_Printf(f, "in_bind %d %s \"%s\"\n", j, Key_KeynumToString (i), keybindings[j][i]);
+ FS_Printf(f, "in_bind %d %s \"%s\"\n", j, Key_KeynumToString (i), bindbuf);
}
}
}
if (!bind)
bind = keybindings[key_bmap2][key];
+ if (developer.integer >= 1000)
+ Con_Printf("Key_Event(%i, '%c', %s) keydown %i bind \"%s\"\n", key, ascii, down ? "down" : "up", keydown[key], bind ? bind : "");
+
if(key_dest == key_game)
{
q = CL_VM_InputEvent(!down, key);