mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-14 17:01:22 +00:00
4898a44263
This has smashed the keydest handling for many things, and bindings, but seems to be a good start with the new input system: the console in qw-client-x11 is usable (keyboard-only). The button and axis values have been removed from the knum_t enum as mouse events are separate from key events, and other button and axis inputs will be handled separately. keys.c has been disabled in the build as it is obsolute (thus much of the breakage).
79 lines
1.7 KiB
C
79 lines
1.7 KiB
C
/*
|
|
gib_keys.c
|
|
|
|
Copyright (C) 1996-1997 Id Software, Inc.
|
|
Copyright (C) 2002 Brian Koropoff <brianhk@cs.washington.edu>
|
|
Copyright (C) 2021 Bill Currie <bill@taniwha.org>
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
modify it under the terms of the GNU General Public License
|
|
as published by the Free Software Foundation; either version 2
|
|
of the License, or (at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
See the GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program; if not, write to:
|
|
|
|
Free Software Foundation, Inc.
|
|
59 Temple Place - Suite 330
|
|
Boston, MA 02111-1307, USA
|
|
|
|
*/
|
|
#ifdef HAVE_CONFIG_H
|
|
# include "config.h"
|
|
#endif
|
|
|
|
#ifdef HAVE_STRING_H
|
|
# include <string.h>
|
|
#endif
|
|
#ifdef HAVE_STRINGS_H
|
|
# include <strings.h>
|
|
#endif
|
|
|
|
#include "QF/cbuf.h"
|
|
#include "QF/cmd.h"
|
|
#include "QF/input.h"
|
|
#include "QF/sys.h"
|
|
#include "QF/gib.h"
|
|
|
|
#include "compat.h"
|
|
#include "old_keys.h"
|
|
|
|
static void
|
|
Key_GIB_Bind_Get_f (void)
|
|
{
|
|
#if 0
|
|
const char *key, *cmd;
|
|
imt_t *imt;
|
|
int k;
|
|
|
|
if (GIB_Argc () != 2) {
|
|
GIB_USAGE ("key");
|
|
return;
|
|
}
|
|
|
|
key = OK_TranslateKeyName (GIB_Argv (1));
|
|
|
|
if ((k = Key_StringToKeynum (key)) == -1) {
|
|
GIB_Error ("bind", "bind::get: invalid key %s", key);
|
|
return;
|
|
}
|
|
|
|
imt = Key_FindIMT ("imt_mod");
|
|
if (!imt || !(cmd = Key_GetBinding (imt, k)))
|
|
GIB_Return ("");
|
|
else
|
|
GIB_Return (cmd);
|
|
#endif
|
|
}
|
|
|
|
void
|
|
GIB_Key_Init (void)
|
|
{
|
|
GIB_Builtin_Add ("bind::get", Key_GIB_Bind_Get_f);
|
|
}
|