PC-Logix / OpenSecurity

Security addon for OpenComputers
MIT License
46 stars 24 forks source link

Keypad issue, low info about that! #71

Closed Gamerexde closed 7 years ago

Gamerexde commented 7 years ago

Hi, i was trying of how to use the keypad, but there is low information about events and that, can some one help me and tell me, oh and add more info regarding events to keypad.

CaitlynMainer commented 7 years ago

https://github.com/PC-Logix/OpenSecurity/wiki/Blocks#keypad

the default event is "keypad" you'll get a keypad event for every button press, with the button index, and the button label, if you're not sure how to use it, run dmesg on the computer, and press some buttons.

Gamerexde commented 7 years ago

No, what i mean is when i try to get that value on variable like print(keypad) that is the issue, can you pleas tell me that, only display the number that i type on the KeyPad.

Angelnightwing commented 7 years ago

This is a question better asked on the forums, rather than an issue tracker.

Gamerexde commented 7 years ago

:(

CaitlynMainer commented 7 years ago

print(keypad) isn't going to work... you'll have to setup an event listener, or do _,_, button, button_label = event.pull("keypad") then print button or button_label

Gamerexde commented 7 years ago

Sorry, im very nuub for this, can you make an example? xd

CaitlynMainer commented 7 years ago

https://oc.cil.li/index.php?/forum/31-programming/

Gamerexde commented 7 years ago

Oh ok done! xd