Page 1 of 1

Qadd for a BlenderPocket keyboard

Posted: Mon Apr 24, 2006 11:19 am
by russose
Hallo,

A PocketPc doesn’t have any keyboard so I am trying to write a virtual keyboard script (this is my first python script :=) ).

Concerning the virtual keyboard drawing, I had no problem. My question concerns the event handling. Today, I am testing the script on the Text window. I am emulating the AKEY like that in the script (in bevent function):

Code: Select all

id = Window.GetScreenInfo(Blender.Window.Types.TEXT)[0]['id']
if (evt == EVENT_KeyA):
		Window.QAdd(id, AKEY, 1)
		Window.QAdd(id, AKEY, 0)
		Window.QHandle(id)
		Window.RedrawAll()
		#Redraw(-1)
But it is not working. The “a” doesn’t appear on the test window.

Do you have any idea where the problem is? Is there something special to take care?

Thanks for your help,
Salvatore

Posted: Sun Apr 30, 2006 10:05 am
by russose
Hi,

After some tests, I manage to emulate hotkeys with my virtual keyboard.

In the 3Dview, if I press the "a" of my virtual keyboard, all objects are selected but in the Text view, the "a" doesn't draw "a". In the Text view, the "TAB" key is working making indentation.

Does someone have information about this strange behaviour? I am just sending the "keyboard event" with Qadd.

Thanks for your help,
Salvatore