linam
Posts: 10
Joined: Mon Sep 05, 2016 3:29 pm

GPIO Keypad in raspberry Pi

Tue Sep 06, 2016 4:46 pm

Hi,

I want to use a matrix keypad in my raspberry pi, I wrote a program that can connect the keypad with pi's gpio. I assigned alphabetic and numeric keys to the keypad and I can read the corresponding key's value of the key when I push it. I'm wondering how to use this keypad as main keyboard for the pi. now this reading of key's value occur in my program and this keypad can't use for all applications in pi. I would be grateful if you could help me that I can use this keypad as keyboard for pi.

User avatar
rpdom
Posts: 15004
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: GPIO Keypad in raspberry Pi

Tue Sep 06, 2016 6:09 pm

One way is to look at using uinput to feed in the keycodes to the Pi. It is a way of making a "dummy" HID device. I've used it once to receive keypresses over a network connection to remotely control an app. I don't have the code for that any more, but it shouldn't be hard to find examples.

linam
Posts: 10
Joined: Mon Sep 05, 2016 3:29 pm

Re: GPIO Keypad in raspberry Pi

Wed Sep 07, 2016 6:53 am

rpdom wrote:One way is to look at using uinput to feed in the keycodes to the Pi. It is a way of making a "dummy" HID device. I've used it once to receive keypresses over a network connection to remotely control an app. I don't have the code for that any more, but it shouldn't be hard to find examples.
thank you for your insightful response. I used uinput and wrote the key's value on it. now I am confused with using this uinput for other applications. how to use it in rpi for example writing google.com in a rpi browser? I don't have problem of using keypad in my application. I don't want to use this keypad remotely, I would use this keypad for a custom destined product using pi.

User avatar
TonyD
Posts: 447
Joined: Thu Sep 08, 2011 10:58 am
Location: Newcastle, UK
Contact: Website

Re: GPIO Keypad in raspberry Pi

Wed Sep 07, 2016 1:37 pm

I think Linux already has a GPIO keypad driver in the kernel. I've not tried it myself but try goggling linux gpio keypad driver and see what results you get
Tony

Return to “General discussion”