Open Jaqster opened 2 years ago
Agreed. We have other ways to simulate input when using the computer that aren't true to the devices, so I don't see a problem with allowing things like using the full keyboard for entering letters (or even using a mouse to navigate and click instead of arrow/A) when using a simulator/phone.
I second this great idea!!!
-Would be a great enhancement both for teaching and debugging to able to:
(Mouse support would also be great, but that is another issue...) ;-)
Apropos: https://forum.makecode.com/t/keyboard-mouse-input-extension/5988 https://github.com/microsoft/pxt-microbit/issues/3857
Where there is will, there is a way. -You can do it!
Keep up all the great work!
Br, Vegard
I think it would be cool if we could get keyboard and mouse and touchscreen events within Arcade. Maybe something like this: (similar to the web APIs)
simulatorOnly.onKeyUp((event: SimulatorOnly.KeyboardEvent) => {
console.log(event);
});
{
"key": "u",
"keyCode": 85,
"code": "KeyU",
"altKey": false,
"ctrlKey": false,
"metaKey": false,
"shiftKey": false,
"repeat": false
}
Similar thing for mouse input. We should do the same for touch screens.
If we have these events implemented, then the game.askForString()
function could just set up callbacks for these and it wouldn't complicate the implementation so much, plus then user games can access these as well.
Perhaps simulator.mouse.x
and simulator.mouse.y
attributes for accessing the mouse position in code?
And maybe a keyboard shorcut linked to a programmable property to switch between the default gamepad input and the keyboard/mouse modes?
That's a good idea too! Speaking of which, there's still no shortcut for the menu button 🤔
That's a good idea too! Speaking of which, there's still no shortcut for the menu button 🤔
I think ` works now!
Is/should be @riknoll assigned to this, since he might soon already be finished with it?: https://forum.makecode.com/t/keyboard-mouse-input-extension/5988/11
Teacher request - when students are testing/debugging programs that include a lot of user input ("Ask for String", "Ask for Number" blocks), it gets tiring to constantly use the game pad to enter data. It would be great to be able to substitute a full keyboard input just for the online Simulator for testing purposes.