There is no spoon


From Unreal Wiki, The Unreal Engine Documentation Site
Revision as of 21:07, 13 June 2005 by (Talk) (Fixed the default properties)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
UT2003 :: Object >> GUI >> GUIUserKeyBinding (Package: XInterface)

As of build 2181, allows mod authors to add their own key bindings to the standard key binder dialog.


  1. Subclass GUIUserKeyBinding.
  1. Add entries to the KeyData array:
  2. * Put the name of a section heading or a key binding in the KeyLabel structure element.
  3. * Set the bIsSection structure element to True if this entry is a section label and not a key binding.
  4. * Put the console command you want to bind in the Alias structure element.

Make a file with the following data in it:


The corresponding MyKeyBinding class:

class MyKeyBindings extends GUIUserKeyBinding;
// Warning: Don't add any extra spaces between elements in struct variable defaults!
    KeyData[0]=(KeyLabel="Capture the Mage",bIsSection=True)
    KeyData[1]=(KeyLabel="Cast Spell",Alias="castspell")
    KeyData[2]=(KeyLabel="Activate Shield",Alias="activateshield")


  • As of build 2199, UT2003 only supports a limited number of custom key bindings in its standard dialog. Any key bindings going beyond that limit will be ignored.

BigJohn: I have tested this and it doesn't seem to be an issue anymore with ut2004

  • Key bindings created with this method are global in UT2003. To make per-mod key bindings (without resorting to workarounds like using a custom .ini file), you can intercept key press and release events with an Interaction.
  • Note that the sample line stated in the comment header of GUIUserKeyBinding is incorrect.

Object=(Class=class;MetaClass=Xinterface.GUIUserKeyBinding,Name=<classname>) - WRONG! Object=(Class=class,MetaClass=Xinterface.GUIUserKeyBinding,Name=<classname>) - correct

Related Topics[edit]