AZERTY keyboard and uikeys.txt

AZERTY keyboard and uikeys.txt

Discuss your problems with the latest release of the engine here. Problems with games, maps or other utilities belong in their respective forums.

Moderator: Moderators

Post Reply
User avatar
BlueTemplar
Posts: 314
Joined: 28 Oct 2007, 22:37

AZERTY keyboard and uikeys.txt

Post by BlueTemplar »

Sometimes the remapping doesn't work, even with key codes.

For instance I'd like to bind drawinmap to ² (the key under Escape), and I've tried both ² and Any+0x0B2 (B2 is hex for 0178) , but neither of these does work.

Something else I found recently: I was very frustrated with the "wait" activating when trying to change the position of buildings. Here's the solution:

Code: Select all

unbind              Any+z  buildspacing inc
bind              Any+w  buildspacing inc
unbind                  w  wait
unbind                  Any+w  wait
unbind                  Shift+w  wait
bind                  z  wait
unbind            Shift+w  wait queued
unbind            Any+w  wait queued
unbind            w  wait queued
bind            Shift+z  wait queued
Gys
Posts: 8
Joined: 21 May 2009, 23:34

Re: AZERTY keyboard and uikeys.txt

Post by Gys »

Hi,
i have an AZERTY keyboard but the Ctrl+1 to define a group doesn't work :(
Do u know how can i fix it?
User avatar
manolo_
Posts: 1370
Joined: 01 Jul 2008, 00:08

Re: AZERTY keyboard and uikeys.txt

Post by manolo_ »

tried alt+shift (switching between german (or what ever) and english keyboard layout)
Gys
Posts: 8
Joined: 21 May 2009, 23:34

Re: AZERTY keyboard and uikeys.txt

Post by Gys »

I finally found the answer here (for french keyboard)
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Re: AZERTY keyboard and uikeys.txt

Post by trepan »

The 'keysym' uikeys.txt keyword can be used to
make the file more readable if you're using a lot
of hexadecimal keycodes.
bashar
Posts: 152
Joined: 03 Dec 2006, 23:06

Re: AZERTY keyboard and uikeys.txt

Post by bashar »

up to this old thread.
I've problem with my own french azerty keyboard, can't :
- change space between build
- slowdown or speedup (do volume up or down instead...)
- can't use group 6 (volume down instead).

there is my uikeys.txt content. I added some command at the end, following recommandations I found on some thread or wiki, but no success about the three problem I describe (but it's ok for the other add I did in the file, like I can now draw on map, I can change build orientation too).

help!

Code: Select all

//
//  DEFAULT UIKEYS.TXT FOR SPRING
//  -----------------------------
//


//
//  Quick Notes:
//
//  1. The built-in default bindings are always loaded. If you wish
//     to override them, use the unbindall and unbind commands
//     to delete them at the beginning of your 'uikeys.txt'.
//
//  2. More then one action can be bound to a specific keyset. The
//     actions for any given keyset are tried in the order that they
//     were bound. The first currently available command that matches
//     an action is used.
//
//  3. As a slight modification to the above note, keysets that use
//     the 'Any' modifier are tried after those that do not use it.
//
//  4. A keyset using the Shift modifier should be bound with its
//     unshifted key  (ex: bind  "Shift+."  instead of  "Shift+>" )
//


//
//  Commands that can be used in this file:
//
//    unbindall
//    ---------
//    - removes all bindings, and adds "bind enter chat"
//      (one of the other unbind commands can get rid of that one)
//    - good for deleting the default bindings
//
//    keysym <name> <keycode>
//    -----------------------
//    - add a custom key symbol  (the default key symbols can not be overriden)
//    - name must start with a letter, and only contain letters, numbers, and '_'
//    - the <keycode> can be a currently recognized keysym
//      (ex:  "keysym menu 0x13F"  or  "keysym radar r")
//
//    fakemeta <keysym>
//    -----------------
//    - assign an auxiliary key for the Meta modifier ("space" is a good choice)
//    - use "fakemeta none" to disable this feature
//
//    bind <keyset> <action>
//    ----------------------
//    - appends the action to the keyset's list of actions
//    - the action can be just a command, or a command with arguments
//
//    unbind <keyset> <action>
//    ------------------------
//    - removes the action from the keyset's list of actions
//    - both the action and the keyset must match
//
//    unbindkeyset <keyset>
//    ---------------------
//    - removes all bindings that use the keyset
//
//    unbindaction <action>
//    ---------------------
//    - removes all bindings that use the action  (command that is, a misnomer)
//
//
//  * NOTE: These commands can also be run from the chat line in-game using
//          the slash command syntax  (/bind, /unbind, etc...)
//


//
//  Keyset Format:
//
//    A keyset is a combination of keys, the main key and its modifiers.
//
//    Here are some examples:
//
//      bind            a  fake_action
//      bind       Ctrl+a  fake_action
//      bind          C+a  fake_action
//      bind Ctrl+Shift+a  fake_action
//      bind          *+a  fake_action
//
//    The format then goes like this:
//
//      [<Modifier>+]...[<Modifier>+]<keysym>
//
//
//    The modifiers (and their abbreviations), are:
//
//      Any   (*)
//      Alt   (A)
//      Ctrl  (C)
//      Meta  (M)
//      Shift (S)
//
//    The special 'Any' modifier makes it so that the keyset matches
//    regardless of the current state of the real modifiers.
//
//    The known keysyms (key symbols), are listed at the end of this file.
//    If you want to use a key that is unknown to Spring, then you may use
//    the hexadecimal notation. Here are two equivalent bindings:
//
//      bind Ctrl+0x20  firestate 0  // hold fire
//      bind Ctrl+space firestate 0  // hold fire
//


//
//  Extra Run-Time Commands
//
//    /keyload   : loads the uikeys.txt bindings  (does not clear current bindings)
//    /keyreload : loads the uikeys.txt bindings  (clears current bindings first)
//    /keysave   : save current bindings to 'uikeys.tmp'  (NOTE: 'tmp' vs. 'txt')
//    /keysyms   : prints the known keysyms to standard out
//    /keycodes  : prints the known keycodes to standard out
//    /keyprint  : prints the current bindings to standard out
//    /keydebug  : prints debugging information to standard out (for each keystroke)
//


//
//  Hotbinding:
//
//    The default bindings include the 'hotbind' (Ctrl+insert) and
//    'hotunbind' (Ctrl+delete) capabilities. Place the mouse cursor over one
//    of the control panel icons (normal command or build command), and press
//    Ctrl+insert. Spring will then ask for a keyset, which will then have the
//    icon's command immediately appended to its list of actions. Placing the
//    mouse cursor over an icon and hitting Ctrl+delete will delete all bindings
//    associated with that icon's command.
//


//
//  Default Bindings:
//
//  fakemeta          space
//
//  bind                esc  quitmenu
//  bind     Ctrl+Shift+esc  quitforce
//
//  bind          Any+enter  chat
//  bind          Alt+enter  chatally
//  bind          Alt+enter  chatswitchally
//  bind         Ctrl+enter  chatall
//  bind         Ctrl+enter  chatswitchall
//  bind        Shift+enter  chatspec
//  bind        Shift+enter  chatswitchspec
//
//  bind          Any+enter  edit_return
//  bind         Any+escape  edit_escape
//  bind            Any+tab  edit_complete
//  bind      Any+backspace  edit_backspace
//  bind         Any+delete  edit_delete
//  bind           Alt+left  edit_home
//  bind           Any+home  edit_home
//  bind          Alt+right  edit_end
//  bind            Any+end  edit_end
//  bind           Any+left  edit_prev_char
//  bind          Any+right  edit_next_char
//  bind          Ctrl+left  edit_prev_word
//  bind         Ctrl+right  edit_next_word
//  bind             Any+up  edit_prev_line
//  bind           Any+down  edit_next_line
//
//  bind             Ctrl+v  pastetext
//
//  bind          Any+pause  pause
//
//  bind              Any+j  mouse2
//  bind          backspace  mousestate
//  bind    Shift+backspace  togglecammode
//  bind     Ctrl+backspace  togglecammode
//
//  bind              Any+i  gameinfo
//
//  bind              Any+l  togglelos
//  bind              Any+;  toggleradarandjammer
//  bind            Any+tab  toggleoverview
//
//  bind                  ,  prevmenu
//  bind                  .  nextmenu
//  bind            Shift+,  decguiopacity
//  bind            Shift+.  incguiopacity
//
//  bind        Ctrl+insert  hotbind
//  bind        Ctrl+delete  hotunbind
//
//  bind              Any++  speedup
//  bind              Any+=  speedup
//  bind              Any+-  slowdown
//  bind         Any+insert  speedup
//  bind         Any+delete  slowdown
//  bind        Any+numpad+  speedup
//  bind        Any+numpad-  slowdown
//
//  bind              Alt+b  debug
//  bind              Alt+v  debugcolvol
//  bind              Alt+o  singlestep
//
//  bind              Any+h  sharedialog
//
//  bind              Any+c  controlunit
//  bind             Ctrl+t  trackmode
//  bind              Any+t  track
//

//  bind              Any+\  drawinmap
//  bind           Any+0xa7  drawinmap
//
//  bind           Any+home  increaseViewRadius
//  bind            Any+end  decreaseViewRadius
//
//  bind             Any+up  moveforward
//  bind           Any+down  moveback
//  bind          Any+right  moveright
//  bind           Any+left  moveleft
//  bind         Any+pageup  moveup
//  bind       Any+pagedown  movedown
//  bind          Any+shift  movefast
//  bind           Any+ctrl  moveslow
//
//  bind                  1  specteam 0
//  bind                  2  specteam 1
//  bind                  3  specteam 2
//  bind                  4  specteam 3
//  bind                  5  specteam 4
//  bind                  6  specteam 5
//  bind                  7  specteam 6
//  bind                  8  specteam 7
//  bind                  9  specteam 8
//  bind                  0  specteam 9
//  bind             Ctrl+1  specteam 10
//  bind             Ctrl+2  specteam 11
//  bind             Ctrl+3  specteam 12
//  bind             Ctrl+4  specteam 13
//  bind             Ctrl+5  specteam 14
//  bind             Ctrl+6  specteam 15
//  bind             Ctrl+7  specteam 16
//  bind             Ctrl+8  specteam 17
//  bind             Ctrl+9  specteam 18
//  bind             Ctrl+0  specteam 19
//
//  bind              Any+0  group0
//  bind              Any+1  group1
//  bind              Any+2  group2
//  bind              Any+3  group3
//  bind              Any+4  group4
//  bind              Any+5  group5
//  bind              Any+6  group6
//  bind              Any+7  group7
//  bind              Any+8  group8
//  bind              Any+9  group9
//
// bind              Any+z  buildspacing inc
// bind              Any+x  buildspacing dec
//
//  bind                  [  buildfacing inc
//  bind            Shift+[  buildfacing inc
//  bind                  ]  buildfacing dec
//  bind            Shift+]  buildfacing dec

//  bind                  a  attack
//  bind            Shift+a  attack
//  bind              Alt+a  areaattack
//  bind        Alt+Shift+a  areaattack
//  bind                  d  manualfire
//  bind            Shift+d  manualfire
//  bind             Ctrl+d  selfd
//  bind       Ctrl+Shift+d  selfd queued
//  bind                  e  reclaim
//  bind            Shift+e  reclaim
//  bind                  f  fight
//  bind            Shift+f  fight
//  bind              Alt+f  forcestart
//  bind                  g  guard
//  bind            Shift+g  guard
//  bind                  k  cloak
//  bind            Shift+k  cloak
//  bind                  l  loadunits
//  bind            Shift+l  loadunits
//  bind                  m  move
//  bind            Shift+m  move
//  bind                  p  patrol
//  bind            Shift+p  patrol
//  bind                  r  repair
//  bind            Shift+r  repair
//  bind                  s  stop
//  bind            Shift+s  stop
//  bind                  u  unloadunits
//  bind            Shift+u  unloadunits
//  bind                  w  wait
//  bind            Shift+w  wait queued
//  bind                  x  onoff
//  bind            Shift+x  onoff
//
//  bind                  q  groupselect
//  bind                  q  groupadd
//  bind             Ctrl+q  aiselect
//  bind            Shift+q  groupclear
//
//  bind            Ctrl+f1  viewfps
//  bind            Ctrl+f2  viewta
//  bind            Ctrl+f3  viewtw
//  bind            Ctrl+f4  viewrot
//
//  bind             Any+f1  showElevation
//  bind             Any+f2  ShowPathTraversability
//  bind             Any+f3  LastMsgPos
//  bind             Any+f4  ShowMetalMap
//  bind             Any+f5  hideinterface
//  bind             Any+f6  NoSound
//  bind             Any+f7  dynamicSky
//  bind      Ctrl+Shift+f8  savegame
//  bind             Any+f9  showhealthbars
//  bind     Ctrl+Shift+f10  createvideo
//  bind            Any+f11  screenshot
//  bind            Any+f12  screenshot
//
//  bind             Ctrl+a  select AllMap++_ClearSelection_SelectAll+
//  bind             Ctrl+b  select AllMap+_Builder_Idle+_ClearSelection_SelectOne+
//  bind             Ctrl+c  select AllMap+_ManualFireUnit+_ClearSelection_SelectOne+
//  bind             Ctrl+r  select AllMap+_Radar+_ClearSelection_SelectAll+
//  bind             Ctrl+v  select AllMap+_Not_Builder_Not_Commander_InPrevSel_Not_InHotkeyGroup+_SelectAll+
//  bind             Ctrl+w  select AllMap+_Not_Aircraft_Weapons+_ClearSelection_SelectAll+
//  bind             Ctrl+x  select AllMap+_InPrevSel_Not_InHotkeyGroup+_SelectAll+
//  bind             Ctrl+z  select AllMap+_InPrevSel+_ClearSelection_SelectAll+

//  Key Symbol    Key Code
//  ----------    --------
//
//  !             0x021
//  "             0x022
//  #             0x023
//  $             0x024
//  %             0x025
//  &             0x026
//  '             0x027
//  (             0x028
//  )             0x029
//  *             0x02A
//  +             0x02B
//  ,             0x02C
//  -             0x02D
//  .             0x02E
//  /             0x02F
//  0             0x030
//  1             0x031
//  2             0x032
//  3             0x033
//  4             0x034
//  5             0x035
//  6             0x036
//  7             0x037
//  8             0x038
//  9             0x039
//  :             0x03A
//  ;             0x03B
//  <             0x03C
//  =             0x03D
//  >             0x03E
//  ?             0x03F
//  @             0x040
//  [             0x05B
//  \             0x05C
//  ]             0x05D
//  ^             0x05E
//  _             0x05F
//  `             0x060
//  a             0x061
//  alt           0x134
//  b             0x062
//  backspace     0x008
//  c             0x063
//  clear         0x00C
//  ctrl          0x132
//  d             0x064
//  delete        0x07F
//  down          0x112
//  e             0x065
//  end           0x117
//  enter         0x00D
//  esc           0x01B
//  escape        0x01B
//  f             0x066
//  f1            0x11A
//  f10           0x123
//  f11           0x124
//  f12           0x125
//  f13           0x126
//  f14           0x127
//  f15           0x128
//  f2            0x11B
//  f3            0x11C
//  f4            0x11D
//  f5            0x11E
//  f6            0x11F
//  f7            0x120
//  f8            0x121
//  f9            0x122
//  g             0x067
//  h             0x068
//  home          0x116
//  i             0x069
//  insert        0x115
//  j             0x06A
//  joy0          0x12C
//  joy1          0x12D
//  joy2          0x12E
//  joy3          0x12F
//  joy4          0x130
//  joy5          0x131
//  joy6          0x132
//  joy7          0x133
//  joydown       0x141
//  joyleft       0x142
//  joyright      0x143
//  joyup         0x140
//  joyw          0x193
//  joyx          0x190
//  joyy          0x191
//  joyz          0x192
//  k             0x06B
//  l             0x06C
//  left          0x114
//  m             0x06D
//  meta          0x136
//  n             0x06E
//  numpad*       0x10C
//  numpad+       0x10E
//  numpad-       0x10D
//  numpad.       0x10A
//  numpad/       0x10B
//  numpad0       0x100
//  numpad1       0x101
//  numpad2       0x102
//  numpad3       0x103
//  numpad4       0x104
//  numpad5       0x105
//  numpad6       0x106
//  numpad7       0x107
//  numpad8       0x108
//  numpad9       0x109
//  numpad=       0x110
//  numpad_enter  0x10F
//  o             0x06F
//  p             0x070
//  pagedown      0x119
//  pageup        0x118
//  pause         0x013
//  printscreen   0x13C
//  q             0x071
//  r             0x072
//  return        0x00D
//  right         0x113
//  s             0x073
//  shift         0x130
//  space         0x020
//  t             0x074
//  tab           0x009
//  u             0x075
//  up            0x111
//  v             0x076
//  w             0x077
//  x             0x078
//  y             0x079
//  z             0x07A
//  {             0x07B
//  |             0x07C
//  }             0x07D
//  ~             0x07E

bind     c capture
bind              Any+*  drawinmap

unbind  Any+-  slowdown
bind 0x26 specteam 1
bind Any+0x26 group1
bind 0xe9 specteam 2
bind Any+0xe9 group2
bind 0x22 specteam 3
bind Any+0x22 group3
bind 0x27 specteam 4
bind Any+0x27 group4
bind 0x28 specteam 5
bind Any+0x28 group5
bind 0x2d specteam 6
bind Any+0x2d group6
bind 0xe8 specteam 7
bind Any+0xe8 group7
bind 0x5f specteam 8
bind Any+0x5f group8
bind 0xe7 specteam 9
bind Any+0xe7 group9
bind 0xe0 specteam 0
bind Any+0xe0 group0

bind        Any+numpad+  speedup
bind        Any+numpad-  slowdown
bind            numpad2  buildfacing  south
bind            numpad4  buildfacing  west
bind            numpad6  buildfacing  east
bind            numpad8  buildfacing  north

bind            Any+0x05E  buildspacing inc
bind            Any+0x024  buildspacing dec

User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: AZERTY keyboard and uikeys.txt

Post by Jools »

bashar wrote:up to this old thread.
- slowdown or speedup (do volume up or down instead...)
XTA and also BA I think changed slowdown/speedup to be alt and +/-, and volume keys to be +/-. If you want to remap those I think you should use:

Code: Select all

bind +/- speedup/slowdown
and edit the snd_volume_osd widget correspondingly. Grab it from here and put a local version on spring/luaui/widgets folder:
http://code.google.com/p/xta-springrts/ ... me_osd.lua

(it has a configuation of pluskey and minuskey, I think those numeric codes are the ones you find in uikeys.txt)
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: AZERTY keyboard and uikeys.txt

Post by knorke »

Which game?
Since a while the games have begun to add their own hotkey-things intead of just uikeys.txt
For example in in Balanced Annihilation the keys that used to be build-spacing are now to cycle through mexes/energy buildings.
List is here:
http://springrts.com/phpbb/viewtopic.php?f=44&t=30173
bashar
Posts: 152
Joined: 03 Dec 2006, 23:06

Re: AZERTY keyboard and uikeys.txt

Post by bashar »

I tried XTA and BA.
Ok Jools, indeed alt+ +/- is ok for speeding up/down the game, thx.

Knorke, I'l check the link you provided. I 'll give u feedback (in around a week cause im going away of my PC for holidays now ^^)
bashar
Posts: 152
Joined: 03 Dec 2006, 23:06

Re: AZERTY keyboard and uikeys.txt

Post by bashar »

Ok so it works.
But it's a bit confusing : indeed I dont have same keys for BA and XTA to inc/dec buildspace (B and N in BA, Z and X in XTA),
and the set of data in uikeys.txt seems ok for some action (like buildfacing) but not ok for anothers (like buildspace).

But maybe I don't use uikeys.txt as it should be ....
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: AZERTY keyboard and uikeys.txt

Post by Jools »

Ba has some widget that overrides the values you set in uikeys. I have these default bindings in uikeys, but you can set them as you wish, and maybe ba people can tell you what widget to disable or edit...

Code: Select all

//  bind              Any+z  buildspacing inc
//  bind              Any+x  buildspacing dec
Post Reply

Return to “Help & Bugs”