capslock state at evt_key_up and evt_key_down

My grid has special custom class for the grid cell editor
(derived from wx.grid.PyGridCellEditor). the starting key
function:

def StartingKey(self, evt):...

(the function called by wxgrid when a key is pressed and is
accepted by "IsAccepted" function) is probably itselves
called by evt_key_down which does not translate the keypress
into proper letter case. I already checked the Shift button
state and translate the letter into capital. But the problem
is i could not detect the state of capslock button.

I wonder if you all have solution to this. Better might, a
function to "cook" raw character in evt_key_down/up into
correct character (just like it does in evt_char).

My grid has special custom class for the grid cell editor
(derived from wx.grid.PyGridCellEditor). the starting key
function:

def StartingKey(self, evt):...

(the function called by wxgrid when a key is pressed and is
accepted by "IsAccepted" function) is probably itselves
called by evt_key_down which does not translate the keypress
into proper letter case. I already checked the Shift button
state and translate the letter into capital. But the problem
is i could not detect the state of capslock button.

There was some work to implement a wxGetKeyState function but I don't think it has been finished yet.

I wonder if you all have solution to this. Better might, a
function to "cook" raw character in evt_key_down/up into
correct character (just like it does in evt_char).

If your cell editor is a wx.TextCtrl then you coudl try creating a wx.keyEvent and passing it to the control's EmulateKeyPress.

···

dody.wijaya2@asp.co.id wrote:

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

I wonder if you all have solution to this. Better might, a
function to "cook" raw character in evt_key_down/up into
correct character (just like it does in evt_char).

If your cell editor is a wx.TextCtrl then you coudl try creating a
wx.keyEvent and passing it to the control's EmulateKeyPress.

Thank you, Robin. It works!

···

--
Best regards,
dody mailto:dody.wijaya2@asp.co.id