Robin, Peter
Pressing AltGr key == pressing the Ctrl and Alt keys simultaneously.
Therefore, if AltGr is pressed event.ControlDown() == 1 and event.AltDown()
== 1.
PyCrust 0.7, Python 2.1.1, wxPython 2.3.3b7, win 98 SE, swiss french
keyboard
In shell.py:
def OnChar(....)
By removing the two lines
elif event.ControlDown() or event.AltDown():
pass
everything is working okay: arrow keys, AltGr chars, last line editing
(Ctrl-X, C, V), Ctrl Up/Down, Alt-P, Alt-N, autocompletion with . and (
def OnKeyDown(...)
Just for testing, I replaced the lines
# Retrieve the previous command from the history buffer.
elif (event.ControlDown() and key == WXK_UP) \
or (event.AltDown() and key in (ord('P'), ord('p'))):
self.OnHistoryRetrieve(step=+1)
# Retrieve the next command from the history buffer.
elif (event.ControlDown() and key == WXK_DOWN) \
or (event.AltDown() and key in (ord('N'), ord('n'))):
self.OnHistoryRetrieve(step=-1)
by
# Retrieve the previous command from the history buffer.
elif ( event.ControlDown() and not(event.AltDown()) and key ==
WXK_UP ) \
or (not(event.ControlDown()) and event.AltDown()and key in
(ord('P'), ord('p')) ):
self.OnHistoryRetrieve(step=+1)
# Retrieve the next command from the history buffer.
elif ( event.ControlDown() and not(event.AltDown()) and key ==
WXK_DOWN ) \
or ( not(event.ControlDown()) and event.AltDown() and key in
(ord('N'), ord('n')) ):
self.OnHistoryRetrieve(step=-1)
The goal is to unable AltGr+P ou AlrGr+N. But, this is not necessary.
To Robin:
I tested again the wxSTC control in all the samples and in the demo.
Everything is working okay.
Jean-Michel Fauth, Martigny, Switzerland, an amateur programmer
jmfauth@bluewin.ch