capture keystrokes (special keys [KEYCODE_BUTTON_L1 ..] on zebra handheld barcode scanner with delphi fmx (android) application

81 views Asked by At

i need catch special keys (KEYCODE_BUTTON_L1,KEYCODE_BUTTON_R1 ..) on zebra handheld barcode scanner with delphi fmx (android) application.i use delphi 10.4.2 . but onkeydown not working. onkeyup return 0.

can someone help?

thanks.

1

There are 1 answers

1
andiroid5x 5.1 On

thanks all.

its :

procedure TForm1.FormKeyUp(Sender: TObject; var Key: Word; var KeyChar: Char; Shift: TShiftState); begin if TJKeyCharacterMap.JavaClass.deviceHasKey(AKEYCODE_BUTTON_L1) or TJKeyCharacterMap.JavaClass.deviceHasKey(AKEYCODE_BUTTON_R1) then begin barkodoku; end; end;