Page 1 of 1

CustomInput, conditional consuming property

Posted: Sun May 05, 2019 8:22 am
by eduran
Is there a way to make a custom input only block game events under certain conditions? Specifically, I would like a hotkey to behave like consuming="game-only" is set when my modded UI is opened. If the UI is closed, it should behave as if consuming="none" is set. I tried to conditionally register for the event, but the key press is still consumed if no event listener is registered.

Re: CustomInput, conditional consuming property

Posted: Tue May 07, 2019 2:45 pm
by eradicator
If you create a custom hotkey, then only your mod would know about it. So i'm not really sure what you're trying to prevent with consuming='game-only'?

Re: CustomInput, conditional consuming property

Posted: Tue May 07, 2019 3:31 pm
by eduran
If I define F5 as a hotkey, that will also open/close the debug overlay. That's what I would like to prevent. Setting consuming to game-only does exactly that, but all the time (i.e. F5 will never do anything that is not specified by my mod).