[Free] Keyboard Listener Extension

Are you looking for extention that tell you which key is pressed on keyboard?

:hammer_and_pick: keyboard listener is a non visible component that listen and return unicode of any keys from external keyboard. include :keyboard: back press, :keyboard: OK, :keyboard: enter(new line), :keyboard: space, :keyboard: Go and all other key based on their unique character code.
you can see unicode of all characters here Unicode of characters :keyboard:

:desktop_computer: Blocks

Block 1: Register textbox for input

component_method(3)

Registers a TextBox to listen for all input from the on-screen keyboard, including Backspace and keyboard hiding.

Block 2: Character received

component_event(3)

Triggered when a character is received from the on-screen keyboard. The keyCode will be 0.

Block 3: Backspace pressed

component_event(4)

Triggered when the backspace key is pressed. Returns the standard key code for backspace (67).

Block 4: KeyboardHidden

Some times your textbox may not be multiple line. in case of that enter will be changed to hide, go, ok or search button. so this event will return -2 when ever you click enter or ok in this case.

component_event(5)

Triggered when the on-screen keyboard is hidden/dismissed. Returns a custom key code of -2.

Block 4: Unregister Textbox

component_method(4)

Stops listening for input from the previously registered TextBox.

:crossed_swords: Example blocks

Instruction to use

:hammer_and_pick: Step 1: add Registertextboxforinput function in the screen initializing event with text box component name you want to retrieve Unicode.
blocks(24)

:hammer_and_pick: Step 2: Accepting Unicode when ever keyboard keys are clicked. in my case i use label to show Unicode of every clicked keys on keyboard.

blocks(25)

blocks(26)

blocks(27)

Output screen record

Download link

Extension
com.KeyListener.KeyListener.aix (8.3 KB)

Sample .aia file
keyListener_example.aia (10.6 KB)

:partying_face: :partying_face:Happy koding

4 Likes

Please fix the spelling error also in the extension and follow the naming conventions there, too ..

Keyboardlistner–> KeyboardListener

Taifun

1 Like

ok @Taifun i will do that, thanks

I think i made it correct :thinking:

1 Like