Commander Hotkey Re-bindings - some keys don't work [Windows and Linux]

ChingzillaChingzilla Join Date: 2013-09-15 Member: 188239Members, Reinforced - Diamond
Was vary excited to see commander re-binding added in 261. I have been trying to get the "grid" layout with my keyboard layout, Dvorak. I am able to bind most normal letter keys, A,O,E,U,Q, etc. but when I try and assign non-alpha keys all hotkeys stop working!

So, for instance, my 'E' key is really '.'. When I assign Period to Grid3, all commander keys stop working. I have been able to reproduce with keys 'Comma', 'Apostrophe', 'Semicolon', and 'Period'.

I have also tried manually changing the bindings in 'options.xml', to the same effect.

Thanks to the developers for adding this, I know there was some significant re-writing to get this far. Now just a little more please :)

Comments

  • SamusDroidSamusDroid Colorado Join Date: 2013-05-13 Member: 185219Members, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Gold, Subnautica Playtester, NS2 Community Developer, Pistachionauts
    There are some keys that just don't work anyways, there is nothing I can really do about that.
  • ChingzillaChingzilla Join Date: 2013-09-15 Member: 188239Members, Reinforced - Diamond
    Understandable. I just want to note that all the above mentioned keys work fine with the normal gameplay bindings.
  • SamusDroidSamusDroid Colorado Join Date: 2013-05-13 Member: 185219Members, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Gold, Subnautica Playtester, NS2 Community Developer, Pistachionauts
    I don't know why, everything is done the exact same way that the normal binds are.
  • ArtfunkelArtfunkel Join Date: 2013-05-10 Member: 185184Members
    I've just spent a couple of hours working out what's going wrong. This is a limit (deficiency, if you ask me...) of Spark.

    Spark hands input to the game in two ways: Commands and Hotkeys. There can be up to 32 commands, and NS2 already uses all of them. There can be any number of hotkeys, but Spark only defines A-Z, Esc, and Space.

    This means that even though you can use apostrophe, comma, etc for commands (e.g. move, shoot) it's impossible to use the same keys as hotkeys. And it's hotkeys which drive the UI. :(

    The good news is that's it's entirely possible and probably quite easy for UWE to extend the hotkey system to cover every single key.

    For reference, here is every keyboard input that NS2's game code knows about:
    // Commands
    Move.PrimaryAttack          = bit.lshift(1, 0)
    Move.SecondaryAttack        = bit.lshift(1, 1)
    Move.NextWeapon             = bit.lshift(1, 2)
    Move.PrevWeapon             = bit.lshift(1, 3)
    Move.Reload                 = bit.lshift(1, 4)
    Move.Use                    = bit.lshift(1, 5)
    Move.Jump                   = bit.lshift(1, 6)
    Move.Crouch                 = bit.lshift(1, 7)
    Move.MovementModifier       = bit.lshift(1, 8)
    Move.Minimap                = bit.lshift(1, 9)
    Move.Buy                    = bit.lshift(1, 10)
    Move.ToggleFlashlight       = bit.lshift(1, 11)
    Move.Weapon1                = bit.lshift(1, 12)
    Move.Weapon2                = bit.lshift(1, 13)
    Move.Weapon3                = bit.lshift(1, 14)
    Move.Weapon4                = bit.lshift(1, 15)
    Move.Weapon5                = bit.lshift(1, 16)
    Move.Drop                   = bit.lshift(1, 17)
    Move.Taunt                  = bit.lshift(1, 18)
    Move.Scoreboard             = bit.lshift(1, 19)
    Move.Exit                   = bit.lshift(1, 20)
    Move.ScrollForward          = bit.lshift(1, 21)
    Move.ScrollLeft             = bit.lshift(1, 22)
    Move.ScrollRight            = bit.lshift(1, 23)
    Move.ScrollBackward         = bit.lshift(1, 24)
    Move.ToggleRequest          = bit.lshift(1, 25)
    Move.ToggleSayings          = bit.lshift(1, 26)
    Move.Eject                  = bit.lshift(1, 27)
    Move.TextChat               = bit.lshift(1, 28)
    Move.TeamChat               = bit.lshift(1, 29)
    Move.QuickSwitch            = bit.lshift(1, 30)
    Move.ReadyRoom              = bit.lshift(1, 31)
    
    // Hotkeys
    Move.None                = 0 
    Move.Q                   = 1
    Move.W                   = 2
    Move.E                   = 3
    Move.R                   = 4
    Move.T                   = 5
    Move.Y                   = 6
    Move.U                   = 7
    Move.I                   = 8
    Move.O                   = 9
    Move.P                   = 10
    Move.A                   = 11
    Move.S                   = 12
    Move.D                   = 13
    Move.F                   = 14
    Move.G                   = 15
    Move.H                   = 16
    Move.J                   = 17
    Move.K                   = 18
    Move.L                   = 19
    Move.Z                   = 20
    Move.X                   = 21
    Move.C                   = 22
    Move.V                   = 23
    Move.B                   = 24
    Move.N                   = 25
    Move.M                   = 26
    Move.Space               = 27
    Move.ESC                 = 28
    
  • ArtfunkelArtfunkel Join Date: 2013-05-10 Member: 185184Members
Sign In or Register to comment.