密码键盘模式参考
在 PIN Pad 模式下,会显示一个数字键盘供用户输入,例如:
密码键盘类型
从以下选项之一中选择密码键盘类型:
按键布局
从以下选项之一中选择按键布局:
形象设计
定义最多三个 PIN Pad 设计。每个设计都定义了以下布局中用于正常显示和按钮显示的图像:
Below is an example of a normal image followed by a corresponding keys pushed image:
Message Area:
After entering PIN pad mode, the initial message area from the normal image is shown. When an error occur, the message area from the keys pushed image is shown. The message area size is 800 x 55 dots.
PIN display area:
The characters displayed when pressing a (0~9, *, # and .) are included in the normal image. The display area size is 665 x 74 dots.
The PIN code display image size is 49 x 66 dots. The location of this area is (68, 55) from the top left corner.
The size and location of each PIN code:
PIN code | Size (w * h) | Location (x,y) |
---|---|---|
0 | 49 * 66 | 72, 59 |
1 | 49 * 66 | 121, 59 |
2 | 49 * 66 | 170, 59 |
3 | 49 * 66 | 219, 59 |
4 | 49 * 66 | 268, 59 |
5 | 49 * 66 | 317, 59 |
6 | 49 * 66 | 366, 59 |
7 | 49 * 66 | 415, 59 |
8 | 49 * 66 | 464, 59 |
9 | 49 * 66 | 513, 59 |
* | 49 * 66 | 562, 59 |
# | 49 * 66 | 611, 59 |
. | 49 * 66 | 660, 59 |
PIN pad area:
Button images are included in the normal image. Pushed button images are included in the button pushed image. When a button is pushed, the corresponding button image is displayed.
The size and location of each button:
Buttons | Size (w * h) | Location (x,y) |
---|---|---|
0 | 174 * 66 | 217, 384 |
1 | 174 * 66 | 30, 147 |
2 | 174 * 66 | 217, 147 |
3 | 174 * 66 | 404, 147 |
4 | 174 * 66 | 30, 226 |
5 | 174 * 66 | 217, 226 |
6 | 174 * 66 | 404, 226 |
7 | 174 * 66 | 30, 305 |
8 | 174 * 66 | 217, 305 |
9 | 174 * 66 | 404, 305 |
'*' or '.' | 174 * 66 | 30, 384 |
# or 00 | 174 * 66 | 404, 284 |
Clear | 174 * 89 | 596, 147 |
Cancel | 174 * 89 | 596, 254 |
Enter | 174 * 89 | 596, 361 |
PIN Pad Image Settings
Each image design requires the settings:
Item | Description |
---|---|
Image design number | Image design number 1..3 |
PIN pad normal image | Image data includes normal buttons, initial message, PIN code display fonts and background image |
PIN pad buttons pushed image | Image data includes pushed buttons, error message and background image |
PIN pad type | Keypad type 1..3 |
Key layout | Round Robin or specific key layout 0..5 |
PIN Operation settings
Before entering PIN pad mode, the images and settings must be stored. The following options must be set when entering PIN pad mode.
Item | Description |
---|---|
PIN Pad Image | Select the PIN pad image design from pattern 1..3 |
PIN Bypass | Set PIN Bypass=1 to disable the minimum digits check |
Minimum digits | If the PIN input is below Minimum the error message is shown and Min Digit Error is reported |
Maximum digits | If the PIN input exceeds Maximum the error message is shown and Max Digit Error is reported. The maximum number of digits is 12 |
Number Hidden Mode | If this mode is enabled, PIN input codes are shown for 500msec and hidden by *. If the next PIN is input within 500msec, the previous value is hidden by * after input. |
Enter Message id | MessageBox screen to show after Enter |
Cancel Message id | MessageBox screen to show after Cancel |
PIN Pad Mode Return
UI Event Data reports the list of selected keys as follows:
Item | Value |
---|---|
Key Input | 0x00: Cancel (PIN values = 0xF) 0x01: Enter 0x02: Min Digit Error (PIN values = 0xF) 0x03: Max Digit Error (PIN values = 0xF) |
List of PIN codes in the order selected (1..13) | 0 to 9 0x0A = * 0x0B = # 0x0C = . |
In addition to sending the report:
Button | Function |
---|---|
0 to 9 | Store pushed button number |
* . # 00 | Store pushed character 00: Store 00 and show 2 digits 00 |
Clear | Clear input PIN code and clear PIN display area e.g. If Clear button is pushed after 1, 2, 3 are input, all 1, 2, 3 are cleared. |
Enter | 条件 1:输入 PIN 码数字在(最大,最小)数字设置范围内:输出 PIN 码并从 PIN pad 模式退出到 Normal 模式。条件 2:输入 PIN 码数字低于(最小)数字设置:显示错误消息 2 秒并从 PIN 键盘模式退出到正常模式,并报告最小数字错误 |
取消 | 发出取消报告并从密码键盘模式退出到正常模式。 |
PIN 操作逻辑
API参考
功能 | 描述 |
---|---|
初始化密码键盘 | 密码键盘设置 |
写入RomImage | 平板电脑写ROM功能 |
设置操作模式 | 选择密码键盘模式 |
代码说明
上传图片
需要图像描述符:
romStartImageData = initializePinPad(encodingMode, pushed, PINPAD_IMAGE_NUM, PINPAD_TYPE, PINPAD_LAYOUT);
启动密码键盘模式
OperationMode_PinPad pinPadMode{ PINPAD_IMAGE_NUM,
0,
m_minDigits,
m_maxDigits,
m_hideNumbers ? 1u : 0u,
PINPAD_LAYOUT,
0,
0 };
OperationMode opMode = initializePinPad(pinPadMode);
m_tablet.setOperationMode(opMode);
接收界面事件
Decode the UI Event data from ReportHandler
onReport(EventDataPinPad & e)
{
switch (e.keyInput)
{
case InputEnter:
m_pinPad = savePin(e);
case InputCancel:
case InputMinDigit:
case InputMaxDigit:
PostMessage(m_hWnd, WM_PINPAD_EVENT, e.keyInput, 0);
}
}
...
// Dialog callback
case WM_PINPAD_EVENT:
switch (wParam)
{
case InputEnter:
{
pin = getSavedPin();
}
...