The keypad state the VBlank interrupt keeps. More...
Go to the source code of this file.
Variables | |
| volatile u32 | gKeysHeld |
| Keys down now. | |
| volatile u32 | gKeysPressed |
| Keys that went down this frame. | |
| volatile u32 | gKeysRepeat |
| Pressed keys, repeating while held: after 19 frames, then every 6. | |
| volatile u32 | gKeysRepeatDirected |
| gKeysRepeat with at most one D-pad direction. | |
| volatile u32 | gKeysDirection |
| The D-pad direction gKeysRepeatDirected keeps: of several held, the one added last. | |
| u32 | gKeysPressedLatch |
| Presses since a reader last cleared it. | |
| u32 | gKeysHeldLast |
| gKeysHeld when the frame loop last read it. | |
| u32 | gKeysHeldAtVBlank |
| gKeysHeld at the previous VBlank. | |
| s32 | gKeyRepeatTimer |
| Frames until the held keys repeat; -1 makes them repeat at once. | |
The keypad state the VBlank interrupt keeps.
The VBlank handler reads the keypad into these cells, and Input_UpdateKeyRepeatAndDirection turns them into repeats after each frame (runtime/frame.c). The first five are volatile, a device: each tag names what differs without it.
Definition in file keystate.h.
|
extern |
Keys down now.
Referenced by BabiPalace_WakeAfterFinals(), Battle_CollectPartyCommands(), Battle_SelectAbility(), BattleFx_ProbeKeysForExtendedActor(), BattleFx_RunVisibilityTransition(), BattleFx_SteerLiftedTarget(), BattleFx_SteerPushedTarget(), BattlePresentation_WaitForAdvance(), Clear_CheckButtonCodes(), Debug_RunPaletteEditor(), DebugBattle_RunMenu(), DebugMenu_BrowseMessageRange(), DjinnMenu_SelectDjinn(), Event_RideLog(), Event_RollLogEastWest(), Event_RollLongLog(), Field_RunPushTileEvent(), Field_RunScene(), FieldEvent_ShowMessageAndWait(), FieldObject_UpdatePlayerControl(), Imil_RunIceSlide(), Imil_SlideActorAcrossIce(), Imil_TurnSkaterTowardHeldDirection(), Imil_TurnSlidingActor(), Input_GetDpadAngle(), Input_UpdateKeyRepeatAndDirection(), ItemMenu_RunOwnerSelection(), LuckyDice_Run(), Map_BuildProbeRing(), Map_UpdateWorldMapMarkers(), Menu_RunSelection(), MercuryLighthouse_HopAcrossPool(), Object_MoveByKeys(), Object_MoveOnWorldMap(), PsynergyMenu_RunList(), ReelGame_RunFrame(), Runtime_AdjustDebugValueWithButtons(), SaveMenu_Run(), SaveState_ScanRecordFlags(), SerialTest_Run(), System_VBlankHandler(), Title_Run(), TretTreeBranch_ExchangeInputPacket(), Ui_RunIconMonitor(), UiText_CheckPauseSkipped(), UiWork_StepChannelScript(), and WaitFrames().
|
extern |
Keys that went down this frame.
Referenced by AltinPeak_ShowSecondBeastRoute(), Battle_SelectAbility(), Battle_ShowPairedUnitWorkAndWait(), BattleFx_SteerLiftedTarget(), BattleFx_SteerPushedTarget(), BattleMenu_RunActionSelection(), BattlePresentation_WaitForAdvance(), BattlePresentation_WaitForPromptAt(), BattleTarget_RunSelection(), CharacterMenu_SelectCommand(), CharacterSelector_RunRearrange(), Debug_SelectAbilityPair(), DebugMenu_SelectItem(), Djinn_ShowJoinedMessage(), DjinnMenu_SelectDjinn(), DjinnMenu_ShowCurrentList(), DjinnMenu_ShowHelp(), DjinnMenu_ShowOwnerStatus(), Event_AskYesNoWithActorAnimation(), Event_UpdateDebugSkip(), Field_CheckConfiguredKeys(), Input_UpdateKeyRepeatAndDirection(), InventoryMenu_ShowModalMessage(), ItemLevel_RunLevelEditor(), ItemLevel_SelectAbility(), ItemLevel_SelectItem(), ItemList_SelectEntry(), ItemMenu_ChooseCommand(), ItemMenu_ConfirmDrop(), ItemMenu_ConfirmEquip(), ItemMenu_RunList(), ItemMenu_RunOwnerSelection(), ItemMenu_SelectGiveQuantity(), ItemMenu_SelectItem(), ItemMenu_SelectTarget(), LinkLobby_ChooseDebugPartyPreset(), Menu_CancelSoundTick(), Menu_HandleFlagGridInput(), Menu_RunCommandRow(), Menu_RunResourceSelectionLoop(), Menu_RunWorkspaceOptions(), Menu_RunWorkspaceSelectionLoop(), Menu_SelectionLoop(), Menu_SelectQuantity(), Menu_WaitForSelectionInput(), MercuryLighthouse_HopAcrossPool(), NameEntry_EditOwnerName(), OwnerAction_RunCompareLoop(), Party_ShowJoinedMessage(), Party_ShowPairJoinedMessage(), PsynergyMenu_RunList(), PsynergyMenu_SelectAction(), PsynergyMenu_SelectMember(), PsynergyMenu_SelectOwner(), PsynergyMenu_SelectTarget(), Runtime_AdjustDebugValueWithButtons(), Runtime_IdleForever(), Sanctum_ChooseRestartOption(), Sanctum_RunPartyService(), SaveMenu_Run(), SaveMenu_SelectSlot(), Shop_BuySpecialItem(), Shop_PickUnit(), Shop_PickUnitItem(), Shop_SelectBuy(), Shop_SelectQuantity(), Shop_SelectRepair(), Shop_SelectSell(), Shop_SelectUse(), SummonMenu_SelectSummon(), System_VBlankHandler(), Title_Run(), Title_ShowAnimatedSplash(), Title_ShowIntro(), Title_ShowSplashScreen(), TolbiSpring_RunSpringGame(), Ui_RunIconMonitor(), Ui_RunOwnerStatusScreen(), UiText_CheckTextDismissed(), and UiText_ShowLocalizedMessageAndWait().
|
extern |
Pressed keys, repeating while held: after 19 frames, then every 6.
Referenced by AudioTest_RunParameterController(), Battle_SelectAbility(), BattleFx_RunAtalanta(), BattleFx_RunBoreas(), BattleFx_RunCybele(), BattleFx_RunJudgment(), BattleFx_RunKirin(), BattleFx_RunNeptune(), BattleFx_RunNereid(), BattleFx_RunPaletteParticles(), BattleFx_RunParticleStreams(), BattleFx_RunProcne(), BattleFx_RunRamses(), BattleFx_RunThor(), BattleMenu_RunActionSelection(), BattleTarget_RunSelection(), CharacterMenu_SelectCommand(), CharacterSelector_RunRearrange(), Debug_RunPaletteEditor(), Debug_SelectAbilityPair(), DebugBattle_RunMenu(), DebugBattle_ViewMessages(), DebugMenu_BrowseEntryGlyphs(), DebugMenu_BrowseIcons(), DebugMenu_SelectItem(), DjinnMenu_SelectDjinn(), DjinnMenu_ShowHelp(), DjinnMenu_ShowOwnerStatus(), Input_UpdateKeyRepeatAndDirection(), ItemLevel_SelectAbility(), ItemLevel_SelectItem(), ItemList_SelectEntry(), ItemMenu_ChooseCommand(), ItemMenu_ConfirmDrop(), ItemMenu_ConfirmEquip(), ItemMenu_RunList(), ItemMenu_RunOwnerSelection(), ItemMenu_SelectGiveQuantity(), ItemMenu_SelectItem(), ItemMenu_SelectTarget(), LinkLobby_ChooseDebugPartyPreset(), LuckyDice_Run(), Map_ShowWorldMap(), Menu_HandleFlagGridInput(), Menu_HandlePageInput(), Menu_HandleSelectionRowInput(), Menu_RunCommandRow(), Menu_RunResourceSelectionLoop(), Menu_RunWorkspaceOptions(), Menu_RunWorkspaceSelectionLoop(), Menu_SelectionLoop(), Menu_SelectQuantity(), Menu_WaitForSelectionInput(), NameEntry_EditOwnerName(), Object_MoveOnWorldMap(), OwnerAction_RunCompareLoop(), PartyTalkMenu_Choose(), PsynergyMenu_RunList(), PsynergyMenu_SelectAction(), PsynergyMenu_SelectMember(), PsynergyMenu_SelectOwner(), PsynergyMenu_SelectTarget(), Runtime_AdjustDebugValueWithButtons(), Sanctum_ChooseRestartOption(), Sanctum_RunPartyService(), SaveMenu_SelectSlot(), Shop_BuySpecialItem(), Shop_PickUnit(), Shop_PickUnitItem(), Shop_SelectBuy(), Shop_SelectQuantity(), Shop_SelectRepair(), Shop_SelectSell(), Shop_SelectUse(), SummonMenu_SelectSummon(), System_VBlankHandler(), TretTreeBranch_ExchangeInputPacket(), Ui_RunIconMonitor(), Ui_RunOwnerStatusScreen(), and WaitFrames().
|
extern |
gKeysRepeat with at most one D-pad direction.
Referenced by Input_UpdateKeyRepeatAndDirection().
|
extern |
The D-pad direction gKeysRepeatDirected keeps: of several held, the one added last.
Referenced by Input_UpdateKeyRepeatAndDirection().
|
extern |
Presses since a reader last cleared it.
Referenced by BattleEvent_Playback(), DjinnMenu_SelectDjinn(), System_VBlankHandler(), UiText_CheckTextDismissed(), and UiWork_StepChannelScript().
|
extern |
gKeysHeld when the frame loop last read it.
Referenced by Input_UpdateKeyRepeatAndDirection().
|
extern |
gKeysHeld at the previous VBlank.
Referenced by System_VBlankHandler().
|
extern |
Frames until the held keys repeat; -1 makes them repeat at once.
Referenced by Input_ResetKeyRepeat(), Input_UpdateKeyRepeatAndDirection(), and System_VBlankHandler().