
A function key allows you to trigger an action using a specific key on the mobile device.
You have created a mobile application.
Navigate to the view on the Handhelds UI Explorer tab page.
Choose the Layout tab page.
From the Integration menu, drag and drop the FunctionKey onto the layout.
On the Properties tab page, enter the keyCode .
Specify or create the event to be invoked in the onAction property.
Supported Function Key Codes
You can use the key constants as outlined in the table below:
|
Function Key |
Key Constant |
|
F1 |
f1 |
|
F2 |
f2 |
|
F3 |
f3 |
|
F4 |
f4 |
|
F5 |
f5 |
|
F6 |
f6 |
|
F7 |
f7 |
|
F8 |
f8 |
|
F9 |
f9 |
|
F10 |
f10 |
|
F11 |
f11 |
|
F12 |
f12 |
|
F13 |
f13 |
|
F14 |
f14 |
|
F15 |
f15 |
|
Home |
home |
|
Delete |
delete |
|
End |
end |
|
Page Up |
pageup |
|
Page Down |
pagedown |
|
Caps Lock |
caps |
|
Cancel |
cancel |
|
Enter |
enter |
|
Backspace |
backspace |
All key constants are case-sensitive.
You can use the key codes prefixed with # as outlined in the table below:
|
Function Key |
Key Code |
|
Tab |
9 |
|
|
16777217 |
|
|
16777218 |
|
|
16777219 |
|
|
16777220 |
|
Central Navigation Key |
13 |
|
0 |
48 |
|
1 |
49 |
|
2 |
50 |
|
3 |
51 |
|
4 |
52 |
|
5 |
53 |
|
6 |
54 |
|
7 |
55 |
|
8 |
56 |
|
9 |
57 |
|
a |
97 |
|
b |
98 |
|
c |
99 |
|
d |
100 |
|
e |
101 |
|
f |
102 |
|
g |
103 |
|
h |
104 |
|
i |
105 |
|
j |
106 |
|
k |
107 |
|
l |
108 |
|
m |
109 |
|
n |
110 |
|
o |
111 |
|
p |
112 |
|
q |
113 |
|
r |
114 |
|
s |
115 |
|
t |
116 |
|
u |
117 |
|
v |
118 |
|
w |
119 |
|
x |
120 |
|
y |
121 |
|
z |
122 |
Modifiers
You can use modifiers for combination of keys.
|
Modifier |
Key Constant |
|
Shift |
shift |
|
Ctrl |
ctrl |
|
Alt |
alt |
Usage
You can use key codes and constants in any of the following ways:
For single function keys, use:
<Key constant> or #<Key code>
For multiple function keys and modifiers, use:
<Modifier>&<Key constant> or <Modifier>&#<Key code>
To handle a single function key such as 'a', use #97 .
To handle a combination of modifier and function key such as 'shift' and 'a', use shifta .
To handle a function key represented by a constant such as 'F1', use f1 ,