Dear Ansca Please give physical keyboard support for simulator!

I’m trying to test my 2d platformer while developing it in the simulator and it’s a real bitch :expressionless:

I keep dying because it’s almost impossible to control the hero with a mouse using single touch. If there was a listener for pc or mac physical keyboard in Corona I could actually control my hero instead of having to make a million builds for my device!

I really hope mac app support has keyboard support!!! [import]uid: 38820 topic_id: 22537 reply_id: 322537[/import]

+1 for Android hardware button! [import]uid: 12704 topic_id: 22537 reply_id: 89876[/import]

Try Corona Ultimote. It uses a physical device to transfer data to the simulator. [import]uid: 67800 topic_id: 22537 reply_id: 89916[/import]

Ultimote is OK I guess, but the simple ability to listen to hardware keys on my PC keyboard while running the simulator would make life so much easier!

Something like:

Runtime:addEventListener("key", function(event)  
 if event.key == key.UP then  
 moveUp()  
 end  
end)  

Certain much easier than Ultimote. [import]uid: 132999 topic_id: 22537 reply_id: 95055[/import]

Other uses of the simulator listening to hardware keyboard events:

  • Turn physics debug on & off during the game
  • Slowing the game down for debugging
  • Dumping out debug info at specific points in the game
  • Slowing the game down for debugging
  • Setting the game state to particular points, e.g. hit ‘3’ to jump to level 3 without going through the game menu, or setting the game state to extreme conditions that are hard to reach in the game itself
  • Turn on auto-run mode, e.g. for recording demos

I’m sure you can come up with many many other things. Can’t do that with Ultimote! [import]uid: 132999 topic_id: 22537 reply_id: 95290[/import]

I suppose someone could code a Mac OS X app which you could set keypresses to emulate a ‘touch’ in a defined area of the simulator screen.

eg. press the arrow keys on the keyboard and it ‘touches’ the simulator’s screen within a particular coordinate. That way, the simulator detects a mouseclick on that spot :slight_smile: [import]uid: 10389 topic_id: 22537 reply_id: 95309[/import]

@WauloK: agreed, you could do that, but it’s not as flexible as listening for keyboard events.

For example, if to turn on physics debugging you mapped a key to a touch event at a particular location, then you’d have to remember to take that code out for production, or an end-user could inadvertently turn on debugging!

Listening for keyboard events doesn’t have that problem. [import]uid: 132999 topic_id: 22537 reply_id: 95322[/import]

Keyboard Events would be fantastic to have, and I think an application that let you bind keys to touch positions in the simulator would also be useful, like what WauloK said.

It would be awesome if someone made an mac application that lets you use your multitouch trackpad as the touch screen for the simulator. [import]uid: 127106 topic_id: 22537 reply_id: 96040[/import]

This is coming with the Mac App Store publishing support, but I definitely +1 ansca getting on this one sooner if at all possible, since that is still presumably a ways off.

It would make testing in the simulator so much easier for many types of games.
I have found a way around this… Fair warning though - it’s not pretty.

For Mac, I downloaded a program called “QuickKeys Editor” (30 day free trial) which I found through a Google search. What it allows you to do is create hotkeys (that can be any key or combo) that will click on a specified portion of the interface and then return your mouse.

For what it is, it works pretty well. You can assign the hotkeys only to the Corona window and make them relative to the window location so you can move the simulator around (as long as you use the same device sim.

For example, you could bind the wasd keys to click on the corresponding points of your virtual joystick, and use repeating clicks as long as you hold it down to continue the input.

Edit: And it just occurred to me that if all your gameplay could be controlled entirely by the keyboard on the sim, then you might be able to get away with just put a native textField object off on the corner, click into it, and then listen for editing events and check for wasd presses to move, for example. Might have to turn your key repeats up really high :slight_smile: [import]uid: 87138 topic_id: 22537 reply_id: 96060[/import]