Not all keyboard buttons generate an event
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Panda3D |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
Buttons like ÖÄÜ etc do not trigger any of the events accepted with the functions(only setKeystrokeEvent works) below:
base.buttonThro
base.buttonThro
base.buttonThro
Testmachine is Windows XP p3d 1.8.0
It should be fixed sine 2009 / 1.7.0 (see: http://
##================
# -*- coding: cp1252 -*-
import sys
from direct.
from panda3d import direct
from panda3d.core import ButtonThrower
from panda3d.core import TextNode
from panda3d.core import CardMaker
from direct.directbase import DirectStart
class Keys(DirectObject):
def __init__(self):
#text
def buttons(
out = but
out = out.encode("utf8")
if but=='escape':
k=Keys()
run()
I did dig through the c++ codebase and found why not all keys generate events.
Panda only registers buttonhandles for chars in range from 32 to 126(US-ASCII) in keyboardButton.cxx, line 173.
And panda uses char instead of unsigned char(which would be needed for iso 8859-1 to 8859-15).
Basically all it would take is use unsigned char and extend the range to 255 in the mentioned loop in keyboardButton.cxx
Sorry that I can't help more, maybe someone whith more knowledge of c++ can implement these(or similar) changes.
With the support for Code point (0-255) most of europes charsets would be covered, see: en.wikipedia. org/wiki/ ISO/IEC_ 8859
http://