How to differentiate keyboards in actionscript 3 or AIR? - actionscript

I'm creating a game where the players can use various controllers and keyboards to play. This game is for desktop and it's not used to be played on an internet browser.
Issue: Currently, I am able to detect the key pressed from all the keyboards connected, but there is no way to detect which keyboard pressed it. So in the end result, even if there are several keyboards connected, no one can use the same buttons since pressing a key on a keyboard is like pressing this key on every keyboard.
Looking for: A way to get an ID from the USB device connected that pressed the key so I can track which keyboard is pressing a button or any other way that is able to find out which keyboard has pressed a key.

Related

iOS key strokes without displaying keyboard

I have an external scanner which basically emulates key strokes if the keyboard is active. I tested and whenever the textfield focus is on, it emulates the key strokes. But i don't want to show the keyboard to user.
Can i get the key strokes without showing the keyboard to user? or is it possible to have an off screen keyboard active all time throughout the application?

Adding Voice Dictation (microphone) to ToolBar

What i am trying to do is:
Add one button (Microphone image) in toolbar.
On click of that button, the iOS default voice dictation should get call.
Query: I assume that we can not call default voice dictation but want to confirm.
Is their any workaround or any approach to call voice dictation on click of button in toolbar?
(The query is that dictation button (Mic) get display in keyboard
(for textfield & textview)& on click of that button(Mic) dictation
functionality comes to play, can we add similar button (like Mic) to
toolbar (for textfield & textview) & on click of button dictation
functionality should comes to play.)
Thanks
Dictation is only possible in a text field, and can thus only be started from the keyboard (afaik). It is also not supported for all languages, so it depends on what keyboard is active.
Those buttons are usually seen in chat apps, where they record an audio clip without translating it to text.

Simulating physical key events in UIWebView

I need to create UIButton above UIWebView in iOS SDK, when user press this button it simulates UIWebView a physical keyboard key pressed, in the best situation, arrow keys.

Detecting Bluetooth Keyboard in iPad App

In my app I am having a customer info form on which there are a number of text fields I have used, now when a user edits any field I need to move whole view up so that the editing text field won't get under iPad's internal keyboard and this is working fine.
Now the client wants to use external Bluetooth keyboard for filling this form. Once this external keyboard is connected with iPad then in the app when editing any text field won't show internal keyboard as the external is connected and in this case whole view needs to be on the page and no need to move it up.
But when I edit text field it still goes up without showing internal keyboard on the screen and this leaves half of the screen blank as it moves whole view up.
For this I have tried some ways like enabling internal keyboard show/hide notifications but these notification only gets called when external keyboard is not connected and this is not helping me.
Also have tried with ExternalAccessory framework, but it wont detect the bluetooth connected keyboard also tried with EADemo to detect external keyboard and its not detecting external keyboard but it detects credit card swiper connected trough dock.
If anyone here has gone through this functionality or knows anything related with this, then please let me know.
#SpySudhir --
Logic A:
have a bool variable in some file which will return yes/no value when the keyboard is external or internal.
On the basis of the bool value returned call the animation function.
Logic B:
Listen to the keyboard notification using NSNotificationCenter.
Notifications like will,show,hide notification put an NSLog over their and see which one of them is getting called.
If external board is connected the willShow method does not gets called. so in this case can we can do some work around and set the bool value to no or we can have a counter and check it every time if its value is increased by one or is same something like this.
You should not move the view up when field gets focus - you should only move the view up as a response to a UIKeyboardDidShowNotification. The system takes care of the rest for you.

Show virtual Keyboard when bluetooth keyboard connected?

I am building system for my company that use of a bluetooth RFID reader.
The problem is we cannot show the keyboard when the reader is connecting unless we turn it off.
But I saw this video
http://www.youtube.com/watch?v=0uRlIw5H0wE&feature=related
And I know we can modify the reader to temperately show the keyboard.
(Just like the button on Apple iOS keyboard)
We can ask the provider to taylor-made the reader. So we want to add a physical button on it.
Do anyone know the keycode of that button?
Can it be done just to add a button to send a keycode event???
The button that needs to be pressed is the eject button that's on a mac keyboard. I don't know what the key code is or even if you can send it. But I do know it is the eject button.
The iOS keyboard gets hidden when a bluetooth or some other physical keyboard gets connected.
I think that the button is causing the Bluetooth HID-keyboard profile to disconnect at the scanner (which in-turn enables the iOS keyboard)
I have added details on how to show both bluetooth keyboard(using HID profile) and device virtual keyboard here I want to force keyboard on with bluetooth device please check if it helps.

Resources