Hallo, hab da ne kleine Frage:
Ist es m├Âglich spezial Tasten der Tastatur auszulesen?
Mit spezial Tasten meine ich Multimedia und FN Keys
hier das Programm macht das zwar:
http://www.avbrand.com/software/superkeys/,
aber ich w├╝rde gern EventGhost dazu verwenden!!
Irgendwie erkennt der nicht nur, dass es sich um eine Taste 255 handelt, sondern irgendwie den ZusatzCode dazu auch noch! Um zu verstehen was ich meine, wäre es sinnvoll Superkeys einfach al kurz anzuschauen
Vielen Dank f├╝r eure Hilfe!
Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
Spezial Tasten vom Keyboard
Re: Spezial Tasten vom Keyboard
Ich hab hier was gefunden, was evtl weiter helfen k├Ânnte:
>> Is there a simple way in python to read a keyboard scan code?
The code to do this is on my programming tutor under Event Driven
Programming in the Advanced topics section. It uses Tkinter to
read and print the codes.
The critical part is this bit:
self.txtBox.bind("<Key>", self.doKeyEvent)
def doKeyEvent(self,event):
str = "%d\n" % event.keycode
self.txtBox.insert(END, str)
return "break"
self.txtBox is a standard Text widget in Tkinter.
If you can find my book you'll see the code to do it using
msvcrt.
Again the critical bit is:
key = mscvrt.getch()
if key == '\000' or key == '\xe0' #detect special keys
key = msvcrt.getch() # read the second byte.
HTH,
Alan G.
Author of the Learn to Program website
http://www.freenetpages.co.uk/hp/alan.gauld