List Of All Virtual Key Codes For OnKeyDown And OnKeyUp In Delphi XE6 Firemonkey On Android And IOS

Delphi XE6 Firemonkey Virtual Key CodesIf you are building any kind of cross platform app where you use the keyboard you will probably need to know the various virtual key code constants which are listed in the System.UITypes unit in Delphi XE6 Firemonkey. These key codes also apply to Delphi XE5 and AppMethod. Keys like the hardware back button on your Android device are listed here as well as arrow keys and the like. You can compare the virtual key code that you want to the Key parameter in the OnKeyUp and OnKeyDown events of each control. Keep in mind that there is also the OnTyping event which is fired on IOS in addition to the usual OnKeyUp and OnKeyDown events. If your OnKeyUp and OnKeyDown events are not working for you on IOS try OnTyping instead. To use the virtual key codes you can set up a case statement on the Key parameter on OnKeyUp and OnKeyDown. You can cancel out a key press by setting the Key parameter to 0. Also keep in mind that there is a second parameter called KeyChar in the OnKeyUp and OnKeyDown events. I have had good success with the following code (on Windows at least):

Head over and check out the full list of virtual key codes on Embarcadero’s webiste for use with Delphi XE6 Firemonkey.

Have Delphi Firemonkey questions? Ask and get answers on StackOverflow.

List Of All Virtual Key Codes For OnKeyDown And OnKeyUp In Delphi XE6 Firemonkey On Android And IOS by Delphi XE5 XE6 XE7 XE8 10 Seattle Berlin Firemonkey, Delphi Android, Delphi IOS is licensed under a Creative Commons Attribution 4.0 International License.

Leave a Reply

Show Buttons
Hide Buttons
Read previous post:
Delphi XE5 Firemonkey IOS Midi Keyboard USB API Connection
Access A MIDI Keyboard Using CoreMIDI With Delphi XE5 Firemonkey On IOS

Developer Pavel Jiri Strnad has a post up on his blog on how to access a MIDI keyboard using Delphi...

Close