Skip to content

Order of keyset consumption in spring:Game

Fireball edited this page Mar 22, 2022 · 1 revision

Order in spring:Game to cosume a keyset

KeyPressed

  1. gameTextInput (console edits)
  2. luaInputReceiver
    1. lua keyActions
      1. keyRepeat
      2. keyPress
    2. KeyPress handled directly inside a widget by function w:KeyPress(key, mods, isRepeat, label, unicode)
  3. InputReceivers should be these and maybe more:
    • EndGameBox
    • GameInfo
    • GameSetupDrawer
    • Gui Handler
    • InfoConsole
    • Minimap
    • QuitBox
    • SelectionKeyHandler
    • ShareBox
    • StartPosSelecter
    • TooltipConsole
  4. ActionList (actions defined in spring engine)
  5. First function inside 5) returning true breaks the chain inside 5), but 6) is processed as well
    1. LuaUI GotChatMsg(command, playerID)
    2. ConfigureLayout(command) (If one of the following returns true, no others in this list will be executed)
      1. 'reconf'
      2. 'selector' -> selector.lua ... some more going on here
      3. 'togglewidget'
      4. 'enablewidget'
      5. 'disablewidget'
      6. actionHandler:TextAction
      7. TextCommandList
  6. Same as 5), but for LuaMenu GotChatMsg

KeyReleased

  1. gameTextInput
  2. luaInputReceiver
  3. InputReceivers
  4. ActionList