How to make code that allows the person to type anything in with their keyboard
hey, I think ManiacPumpkin and Recryptech might have some examples of that sorta thing
1 Like
How can i make sdelete text
The text is added to a Text List
The “Text Sanitize” makes it so things like “Shift” or “Backspace” don’t mess with it.
The [Backspace] uses the “pop” input, removing the last item from the list.
Then this is all joined together, so a list of [H,i," ",w,o,r,l,d] becomes “Hi world”
How do i connect it to a label
Just connect that Join output from the List to a Label. The behavior after the Text List rn is just to show the output
How do I make it capped at 15 characters
1 Like
{"data":{"behavior":{"v":"2","nodes":[{"inputCount":0,"outputCount":1,"name":"Typing Example","behaviorType":"logic.NodeGroup","x":180,"y":816,"group":"","id":"8ce7479c6c288b41","isMenuItem":false},{"inputCount":0,"outputCount":2,"name":"Keyboard","behaviorType":"logic.triggers.Keyboard","x":-450,"y":-80,"group":"8ce7479c6c288b41","id":"8ce76ddfa7595848","keyCode":-1},{"inputCount":0,"outputCount":2,"name":"Keyboard","behaviorType":"logic.triggers.Keyboard","x":-270,"y":16,"group":"8ce7479c6c288b41","id":"8ce76e4fe188d841","keyCode":8,"repeats":false,"delay":0},{"inputCount":5,"outputCount":2,"name":"Text","behaviorType":"logic.data.TextBlock","x":-90,"y":64,"group":"8ce7479c6c288b41","id":"8ce7a41f0dface4c","startVal":""},{"inputCount":7,"outputCount":5,"name":"Text List","behaviorType":"logic.data.TextList","x":90,"y":-80,"group":"8ce7479c6c288b41","id":"8ce7bdbddc2b774a","startVal":[],"copy":false},{"inputCount":1,"outputCount":2,"name":"Text Sanitize","behaviorType":"logic.data.TextSanitize","x":-90,"y":-80,"group":"8ce7479c6c288b41","id":"8ce858d7389b0240"},{"inputCount":1,"outputCount":0,"name":"Bundle Output","behaviorType":"logic.NodeGroupOutput","x":270,"y":-16,"group":"8ce7479c6c288b41","id":"8dedcd2038be5b4b","notes":"Connect the output to a label or whatever you like.","n_o":1,"portId":"8ce7479c6c288b41o0","tag":"Text","dataType":1},{"inputCount":3,"outputCount":1,"name":"Switch","behaviorType":"logic.logic.Switch","x":-270,"y":-80,"group":"8ce7479c6c288b41","id":"8dee486be776154f","_startVal":1,"dataType":1},{"inputCount":1,"outputCount":1,"name":"Text List Count","behaviorType":"logic.data.ListCount","x":270,"y":-80,"group":"8ce7479c6c288b41","id":"8dee524c01643d40"},{"gateVal":15,"mode":"less than","inputCount":2,"outputCount":2,"name":"Filter","behaviorType":"logic.logic.Filter2","x":450,"y":-176,"group":"8ce7479c6c288b41","id":"8dee91d7cb14c445"}],"links":[{"input_id":"8dee486be776154fi2","output_id":"8ce76ddfa7595848o0"},{"input_id":"8ce7bdbddc2b774ai4","output_id":"8ce76e4fe188d841o0"},{"input_id":"8ce7a41f0dface4ci1","output_id":"8ce76e4fe188d841o0"},{"input_id":"8ce7bdbddc2b774ai2","output_id":"8ce7a41f0dface4co0"},{"input_id":"8ce7bdbddc2b774ai5","output_id":"8ce7a41f0dface4co0"},{"input_id":"8dee524c01643d40i0","output_id":"8ce7bdbddc2b774ao0"},{"input_id":"8dedcd2038be5b4bi0","output_id":"8ce7bdbddc2b774ao3"},{"input_id":"8ce7bdbddc2b774ai1","output_id":"8ce858d7389b0240o0"},{"input_id":"8ce858d7389b0240i0","output_id":"8dee486be776154fo0"},{"input_id":"8ce7a41f0dface4ci1","output_id":"8dee486be776154fo0"},{"input_id":"8dee91d7cb14c445i1","output_id":"8dee524c01643d40o0"},{"input_id":"8dee486be776154fi1","output_id":"8dee91d7cb14c445o0"},{"input_id":"8dee486be776154fi0","output_id":"8dee91d7cb14c445o1"}]}}}
Same as before, just a Switch in front of the Keyboard behavior now. What happen is;
You type, it gets added to a Text List. It checks how long the list is with the List Count behavior. That then goes to a Filter to see if it’s less than the 15 character limit. If it is, turn the switch off.
2 Likes