Page 1 of 1

Please update the wiki with these Keycodes for Numpad etc

Posted: Fri Oct 21, 2016 10:45 am
by gt52
From many searches I gather that I was not the only one to be confused and bewildered by the unmentionable link to a table of keycodes found on the wiki.

Here I'm offering my current understanding of what one can actually customize, and which codes to use for that:

Code: Select all

/*
  from the source, luke!
  https://github.com/OoliteProject/oolite/blob/master/src/SDL/MyOpenGLView.h

  codes for the 10 keys left of numpad: 
  
  252; // gvArrowKeyRight
  253; // gvArrowKeyLeft
  254; // gvArrowKeyDown
  255; // gvArrowKeyUp
  
  303; // gvHomeKey
  304; // gvEndKey
  305; // gvInsertKey
  306; // gvDeleteKey
  307; // gvPageUpKey
  308; // gvPageDownKey
  .
  .

  numberpad special keys are not listed in /recognized by the code at all. below are the codes for the number keys on the numpad:

  310; // gvNumberPadKey0
  311; // gvNumberPadKey1
  312; // gvNumberPadKey2
  313; // gvNumberPadKey3
  314; // gvNumberPadKey4
  315; // gvNumberPadKey5
  316; // gvNumberPadKey6
  317; // gvNumberPadKey7
  318; // gvNumberPadKey8
  319; // gvNumberPadKey9

  ignoring the function keys, anything left of the backspace key can be assigned by quoting the key, no funny business with codes required there.

  one can not customize 
the Ctrl-key, to, say, turn it into '`' or '\' or another shift key.
also 'Caps-lock' as a switch to make custom views zoomable. 
  
*/

Re: Please update the wiki with these Keycodes for Numpad etc

Posted: Sun Oct 23, 2016 6:03 am
by Diziet Sma

Re: Please update the wiki with these Keycodes for Numpad etc

Posted: Mon Jan 09, 2017 5:52 am
by Keeper
Here's a question: Is it possible to enter two values for an argument in the keyconfig.plist? For example, if I want to add the NumPad0 as the Weapons Toggle but not get rid of the default Underscore command (in case I forget that I changed the value in the heat of the moment)...

Can I use a comma in the argument, i.e. key_weapons_online_toggle = "_",310 ?
or enter both values without a comma separator?

I guess I can experiment and see what happens...