Open AmasterAmaster opened 6 months ago
Can you please provide more information about your use-case/what problem you are trying to solve with the recommendation you have made here, @AmasterAmaster?
This issue sounds like it might be a case of the XY problem. Per our reporting requirements we recommend users to focus their issues on the underlying problem they are trying to solve rather than a possible solution they have considered to it.
Knowing what the actual underlying issue is helps our engineers better determine a possible course of action on issues.
I am making a text editor (Basically UIX that holds lines of strings), this editor should be able to make a new line when enter is pressed (not shift-enter), similar to how programming text editors work. So I coded it in a way where when enter is pressed, it does make a new line and refocuses back onto that UIX, however the caret does not move down with it (being successful making a newline but unsuccessful moving the text cursor to the right spot). This had led me down to asking if there is a way to have multiple input actions that can happen over time (such as after I make this new line, move the text cursor over 1). There are currently no good solutions that are not hacky or guessing what a user would do, as I don't want to provide a bad user experience when using the text editor.
Current implementation is as follows: I am using "Text Editor Events" and checking for each change, when I discover that enter is pressed, place a character as a marker for later, then read the string for this line, then when you find any markers I placed, replace them with a new line character. It is extremely hacky in doing this when a component or flux node could make this easier and better, as currently it just places the new line character right after the caret, which is not what I wanted.
Sorry for the long explanation.
Is your feature request related to a problem? Please describe.
Currently, there is no easy or feasible way of having multiple key presses in sequence from a user to be used from pure components or flux. Sure there is the "VirtualKey" component which takes in a keyboard to work and only works for a single key press. There is also "VirtualMultiKey" which takes in multiple keys and sends the signal all at once. Yet, not a component that has a list of key presses to do in order.
Describe the solution you'd like
I would like a component that can allow a list of keys that can be pressed in order (with or without a delay between each key, specified by the user). This list will start from the beginning and ensures each one will be pressed eventually.
This will make it easier to make action-based inputs or delayed action-based inputs. For example, When I press the enter key, it would make a new line, then the sequence would continue to the right arrow key pressed and do that action, etc etc etc. All within one component without needing to do some weird chaining.
Describe alternatives you've considered
I have currently tried the "VirtualKey" and "VirtualMultiKey" components, but those require a keyboard or a button press and they only fire off one signal, acting as a single key press action.
Another alternative would be making a smarter text editor component, one where that can allow for additional control within the editor.
Another alternative, if a component is not a good solution to this, would be having flux nodes specifically for knowing when a key press happened and fires an event before UI/UIX or any other listener does things, allowing the programmer to specify what should be done instead when any or a specific key press happens.
I could try to find or make my own mod of this, but I would prefer an in-platform solution to this.
Additional Context
This will help make gadgets and items easier that relay on text based UI and text editors that need to take in user input from the keyboard or from buttons that can allow for multiple key press actions.
Requesters
AmasterAmaster