Strictly speaking similar questions have been asked e.g. AnyLogic: Detect key pressed or which mouse button clicked in “On Click” event of a shape
However my question is a little more broad: does anyone know how to implement the capture of keyboard inputs at any point or time during a model run in AnyLogic – not just when clicking on an object? It would appear that AnyLogic does not do this natively but does anyone know of a way to add some kind of library or utility to make this happen?
Specifically, what I would like to do is set up a number of “hotkeys” (for example ctrl+number) to enable the user to quickly swap between views in a model. I don’t want to use UI buttons to do this as I want to allow the user to navigate within the view window. This is not compatible with UI buttons in that the buttons are in a static location which is likely to become inaccessible due to navigating away from the home position.
If, on the other hand, the user was able to simply press “ctrl+1”, “ctrl+2” etc. to access different views (2D and 3D) then it would make navigating a spatially large model much easier.