Command pinpad.getkey

The command pinpad.getkey is used to capture a key that is pressed on the external pinpad and show a message on the external pinpad display.


  1. message [string] Message that will be displayed on the external PIN-Pad.
  2. timeout [integer] Timeout in seconds that the statement should wait before resuming the execution.
  3. variablereturn [string] Return of the command, where:
    • -1: Timeout was reached and no action was taken
    • KEY_CANCEL: Red key pressed
    • KEY_CLEAR: Yellow key pressed
    • KEY_ENTER: Green key pressed
    The numeric keyboard and extras keys are disabled on pinpad.getkey command execution.


In the example above, a connection is opened to the external PIN-Pad with the command; after that the command pinpad.getkey is executed.

The PIN-Pad waits for 10 minutes and if no action is taken, -1 is returned and stored in the variable sKey. If a key is pressed before 10 minutes (the configured timeout), the pressed key value is returned.

After that, the PIN-Pad is disconnected with the command pinpad.close and the result is displayed through the command display.


This command does not apply if the PIN-Pad used is an internal PIN-Pad.