internationally accepted toggleconsole bind

Tony J. White tjw at webteam.net
Fri Feb 2 10:59:11 EST 2007



https://bugzilla.icculus.org/show_bug.cgi?id=2741

Typing a '`' or '~' for the hardcoded toggleconsole bind is difficult on
many keyboards.  Sure you can bind toggleconsole to a key, but it won't
work when ui has the keycatcher (and shouldn't).  All users currently
need to be able to type '`' or '~' to effectively use the console.

There have been a lot of proposals to fix this issue, such as:
  1) find the keycode for the upper leftmost key and use that
  2) analyze toggleconsole binds to detect the proper key (Frederick's patch)

Unfortunately these solutions turn out to be too complex when you look
at the details.   IMO anyway.

I propose the addition of a new hardcoded bind that I hope would be more
universally accepted:  the key combination Shift-ESC (a.k.a. upper case
Escape).

I picked this key combo because of the comminality and special use of
the keys.  The Esc key is already a requirement of the game
(e.g. closing menus).  The common modifier/meta keys on modern keyboards
are Alt(option on mac), Ctrl and Shift.  Alt and Ctrl are not available
since the key combinations Alt-Esc and Ctrl-Esc seem to have special
window management functionality on Windows platforms.  Shift-Esc seems
to be generally accepted as an available key combo for applications to use
on all of our supported platforms.

Is anyone opposed to adding this?  Patch follows.

-Tony

Index: code/client/cl_keys.c
===================================================================
--- code/client/cl_keys.c       (revision 1038)
+++ code/client/cl_keys.c       (working copy)
@@ -1066,7 +1066,8 @@
 #endif
 
        // console key is hardcoded, so the user can never unbind it
-       if (key == '`' || key == '~') {
+       if (key == '`' || key == '~' ||
+               ( key == K_ESCAPE && keys[K_SHIFT].down ) ) {
                if (!down) {
                        return;
                }



More information about the quake3 mailing list