Keyboard Input..

MidnightCowMidnightCow GBMember

Hi ,

I'm building my first app using CocoSharp ( and Forms ) and whilst testing on the VisualStudio Android Emulator i'd like to be able to use keyboard input from my PC keyboard ( instead of touch events ). I had a look at the documentation and came up with the following, pretty straightforward Event Listener code:

... { var keyListener = new CCEventListenerKeyboard(); keyListener.OnKeyPressed = OnKeyPressed; AddEventListener(keyListener, this); } void OnKeyPressed(CCEventKeyboard keyEvent) { label.Text = "Key Pressed"; }

But this isn't working. Does it only respond to the device soft-keyboard input? Is there a way to listen for pc key input?

Thanks in advance for any help and suggestions.

Posts

Sign In or Register to comment.