CustomInput, conditional consuming property
CustomInput, conditional consuming property
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.
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: CustomInput, conditional consuming property
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'?
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Re: CustomInput, conditional consuming property
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).