Active Topics

 


Reply
Thread Tools
Posts: 7 | Thanked: 0 times | Joined on Mar 2010
#1
Hello!

I am working with the Nokia n900. Did someone have problems with the KeyPress event using Xlib? I have used other events (ButtonPress, MotionNotify...) without any problem but when I implemented the KeyPress and press any key from the Keyboard, nothing happened.

I also tried the simpleGL example (http://wiki.maemo.org/SimpleGL_example) and this specific event is not working neither. Any idea?

Thanks i advance!
 
daperl's Avatar
Posts: 2,427 | Thanked: 2,986 times | Joined on Dec 2007
#2
Yeah, you might have to try using SDL instead of EGL, I haven't had any luck either. Install nehegles and then look in here:

Code:
apt-get source nehegles
Lesson 7 is a good one.

Maybe the X11 stuff we're looking for is buried in some SDL code. If it's available, someone should take a look...
__________________
N9: Go white or go home
 
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,358 times | Joined on Sep 2007 @ Looking at y'all and sighing
#3
Have you tried setting the InputHint on the window?
 

The Following User Says Thank You to qwerty12 For This Useful Post:
daperl's Avatar
Posts: 2,427 | Thanked: 2,986 times | Joined on Dec 2007
#4
Originally Posted by qwerty12 View Post
Have you tried setting the InputHint on the window?
Dude, you're a god.

@nuser

Add this to the top somewhere:

Code:
#include  <X11/Xutil.h>
Put this:

Code:
XWMHints hints;
hints.input = True;
hints.flags = InputHint;
XSetWMHints(x_display, win, &hints);
above this line:

Code:
XMapWindow ( x_display , win );
And see what happens.
__________________
N9: Go white or go home
 

The Following User Says Thank You to daperl For This Useful Post:
Posts: 7 | Thanked: 0 times | Joined on Mar 2010
#5
Hey!!!

Thank you for the answers!!! Now it works!!
 
Posts: 1 | Thanked: 0 times | Joined on Aug 2010
#6
Flawless answers. Worked perfectly. Saved me some hours
 
Reply


 
Forum Jump


All times are GMT. The time now is 21:20.