Qadd for a BlenderPocket keyboard

Scripting in Blender with Python, and working on the API

Moderators: jesterKing, stiv

Post Reply
russose
Posts: 0
Joined: Mon Apr 19, 2004 5:01 pm

Qadd for a BlenderPocket keyboard

Post by russose » Mon Apr 24, 2006 11:19 am

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
Blender is now in your Pocket.
http://russose.free.fr/

russose
Posts: 0
Joined: Mon Apr 19, 2004 5:01 pm

Post by russose » Sun Apr 30, 2006 10:05 am

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
Blender is now in your Pocket.
http://russose.free.fr/

Post Reply