Jump to content

Recommended Posts

Posted (edited)

Hello,

I'm using a virtual keyboard in a project. It's working OK, but sometimes the whole keyboard widget (not only the pressed key) is redrawed. When this happens, the ASCII character (c[0]) returned by the geventEventWait() function is wrong. 

As long as only the pressed key is redrawed, the returned ASCII code is always correct.

I've implemented my own mouse board file, wich included the read_xyz() function. It was not clear to me when this function should return TRUE or FALSE, so until now it returns always TRUE. Can this perhaps cause a different behavior sometimes?

Thanks.

 

Edited by Rafael Zingler
Posted
7 hours ago, Rafael Zingler said:

It's working OK, but sometimes the whole keyboard widget (not only the pressed key) is redrawed. When this happens, the ASCII character (c[0]) returned by the geventEventWait() function is wrong.

Under which circumstances does the entire keyboard widget get redrawn? That should only happen if visibility and similar things change. If you just press a key on the keyboard (that doesn't change the current layout) it should only redraw that key.
Is it possible for you to create a small test-case that allows us to reproduce the problem?

 

7 hours ago, Rafael Zingler said:

I've implemented my own mouse board file, wich included the read_xyz() function. It was not clear to me when this function should return TRUE or FALSE, so until now it returns always TRUE. Can this perhaps cause a different behavior sometimes?

That function is supposed to return TRUE if the data in the GMouseReading struct are valid. Otherwise it has to return FALSE. You can have a look at the STMPE811 driver implementation if you'd like to see an example where that function actually can return FALSE under certain circumstances.

Posted

Joel, thanks for your reply.

 

It was a problem in my read_xyz() function. Sometimes, after releasing the touchscreen, my hardware was reading values significantly different when compared with the values generated with the key pressed. When this happens, the problem occurs. I solved it easily in firmware.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...