Thread: Keyboard use on a control
-
May 28th, 2023, 17:23 #1
-
May 28th, 2023, 17:52 #2
I think keypresses are handled by the Unity engine itself and then passed to FG. So I think you'd need to intercept them from outside FG - but I'm no expert in this.
If there is something that you would like to see in Fantasy Grounds that isn't currently part of the software or if there is something you think would improve a ruleset then add your idea here http://fgapp.idea.informer.com/
-
May 28th, 2023, 23:51 #3
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 19,604
Look at windowcontrol.onClickDown/onClickRelease. There are tons of examples in the built-in rulesets.
If you just need a button, you can look at buttoncontrol.onButtonPressed too.
Regards,
JPGFG Wish List - https://fgapp.idea.informer.com/
-
May 29th, 2023, 09:58 #4
-
May 29th, 2023, 12:16 #5
There are functions for IsControlPressed and onControl and the same for Shift and Alt
https://fantasygroundsunity.atlassia...96644619/Input
That might be the limit.
-
May 29th, 2023, 20:10 #6
What I'd like to do is change a selection in a windowlist on pressing arrows on the keyboard. From what I see in
the Input API there are events only for pressing the Alt, Control and Shift keys.
I think they can be used with a statement likeCode:Input.addEventHandler("onAlt", myFunction);
-
May 29th, 2023, 22:13 #7
-
May 29th, 2023, 23:48 #8
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 19,604
Only text controls support any sort of arrow navigation events. It really hasn't come up as a needed capability more than once or twice in the last 12 years. For text controls, the events are onNavigateLeft, onNavigateRight, onNavigateUp, onNavigateDown; and they will only trigger when on the boundary of the field (i.e. arrow left when in zero character position; arrow right in last character position; arrow down when on last line; arrow up when on first line).
Regards,
JPGFG Wish List - https://fgapp.idea.informer.com/
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks