Please update the wiki with these Keycodes for Numpad etc

An area for discussing new ideas and additions to Oolite.

Moderators: winston, another_commander

Post Reply
gt52
Average
Average
Posts: 11
Joined: Fri Oct 21, 2016 10:00 am

Please update the wiki with these Keycodes for Numpad etc

Post 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. 
  
*/
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6312
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

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

Post by Diziet Sma »

Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
User avatar
Keeper
---- E L I T E ----
---- E L I T E ----
Posts: 273
Joined: Fri Feb 01, 2013 7:44 am
Location: Indian Hills, Nevada, USA

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

Post 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...
Post Reply