PDA

View Full Version : Are there any other "Hotkeys" allowed in FG besides CTRL, ALT and SHIFT?



Skillkoil
August 24th, 2018, 20:53
I am wanting to create an extension that allows a player in the 5E ruleset to hold a hotkey like SHIFT and double click a Skill, I.E. Stealth or Perception and have that dice roll in the dice tower. From what I have gathered the three Hotkeys in the topic are the only ones active and bound. I guess I need to know:

1. Is it possible to bound CTRL, ALT or SHIFT + a skill roll to the dice tower?

2. Are there any other Hotkeys that anyone knows of that I could use instead?

3. Is this even possible to write or has it been tried before?

Thanks!!

Ikael
August 24th, 2018, 22:43
I am wanting to create an extension that allows a player in the 5E ruleset to hold a hotkey like SHIFT and double click a Skill, I.E. Stealth or Perception and have that dice roll in the dice tower. From what I have gathered the three Hotkeys in the topic are the only ones active and bound. I guess I need to know:

1. Is it possible to bound CTRL, ALT or SHIFT + a skill roll to the dice tower?

2. Are there any other Hotkeys that anyone knows of that I could use instead?

3. Is this even possible to write or has it been tried before?

Thanks!!

1) yes

2) no

3) yes/don't know

in Fantasy Grounds "Hotkey" means bottom panel of the desktop where you can store the most common rolls, modifiers, shortcut links etc. What you are asking are key inputs that FG engine API can detect. You can detect if end user is holding those keys with Input.isCtrlPressed(), Input.isAltPressed() and Input.isShiftPressed(). These has to be written as lua and you can make conjunction of all three keys holdings.

Skillkoil
August 24th, 2018, 22:46
Sorry for the syntax error but thank you for the information! That is exactly what I needed!

Bidmaron
August 24th, 2018, 23:32
There is also Interface.onAltPressed and the like that let’s you take action when the key is pressed rather than just checking the status of the key at an instant in time

Skillkoil
August 24th, 2018, 23:34
Appreciate it! Brushing up on lua now so I can start working on it.

Ikael
August 24th, 2018, 23:39
That's non existent API I think he meant Input.onAlt read more from here: https://www.fantasygrounds.com/refdoc/Input.xcp

Bidmaron
August 24th, 2018, 23:44
Yes sorry. Away from computer and saying from memeory which is awful