Welcome
Welcome to a320

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. Registration is fast, simple, and absolutely free, so please, join our community today!

Porting to Linux: question about keyboard

Any and all A320 homebrew topics

Moderator: Moderators

Porting to Linux: question about keyboard

Postby MasterTutu on Wed Jul 01, 2009 4:05 pm

Hi,

I'm porting an application to Dingux. In the configuration, a keyboard driver and optional parameters are required. If I use TTY with parameter /dev/event0, I receive key events in the application. However, for each button press, I receive about 18 events with all kinds of keycodes.

For example, after pressing the 'right' button once, I get:
Key code: 16777304
Key code: 65
Key code: 16777265
Key code: 45
Key code: 16777216
ey code: 16777236
Key code: 16777216
ey code: 16777304
Key code: 44
Key code: 16777265
Key code: 45
Key code: 16777304
Key code: 16777254
Key code: 16777219
Key code: 16777216
ey code: 16777236
Key code: 16777304
Key code: 46
Key code: 16777219

The keycode 16777236 corresponds with KEY_RIGHT which indicates that at least one of the events seem to give the correct code.

So, while it seems to react to button presses now, something still isn't right. Does anybody have an idea of what could be going on. Also, if I am in the Dingux console and I press a button, strange characters appear (eg. [A[A[AA[A[A....) in the command line. Is this normal? It might be related to the problem I'm having.

Thanks!
MasterTutu
 
Posts: 9
Joined: Tue Jun 16, 2009 12:07 pm

Re: Porting to Linux: question about keyboard

Postby Wiredbomb0 on Thu Jul 02, 2009 11:16 pm

That's really awkward that you would get so many codes. I would base that 16777304 would be the correct code but that's just a guess. I have no idea about the [A[A[AA[A[A issue sorry! Good luck with it!
Wiredbomb0
 
Posts: 166
Joined: Thu Apr 23, 2009 10:08 am
Location: Victoria, Australia

Re: Porting to Linux: question about keyboard

Postby zear on Fri Jul 03, 2009 8:25 am

That "[A[A[AA[A[A" characters are normal input of arrow keys in linux console. Just launch anything that doesn't go back to the command line and try to press arrow keys. It will print characters like that. Nothing to worry IMO :)
zear
 
Posts: 98
Joined: Thu Jun 11, 2009 8:34 pm


Return to Homebrew

Who is online

Users browsing this forum: No registered users and 2 guests