key board state

Hi All,

Is there a way to check the status of keys in the key board on click events and also on drag and drop.

I want to process differently if the user has pressed CTRL key down on the following EVT_TREE_SEL_CHANGED and EVT_TREE_BEGIN_DRAG events and also mouse click in general

Any help

Thanks
Thomas

Not sure about trees, I'm a bit rusty, but mouse events carry the shift and ctrl info, eg:
def OnLeftDown(self, evt):
     if evt.ShiftDown():
         #...
Phil

···

At 06:01 PM 3/18/2009, Thomas wrote:

Hi All,

Is there a way to check the status of keys in the key board on click events and also on drag and drop.

I want to process differently if the user has pressed CTRL key down on the following EVT_TREE_SEL_CHANGED and EVT_TREE_BEGIN_DRAG events and also mouse click in general

Hi Thomas,

···

On Thu, Mar 19, 2009 at 1:01 AM, Thomas wrote:

Hi All,

Is there a way to check the status of keys in the key board on click events
and also on drag and drop.

I want to process differently if the user has pressed CTRL key down on the
following EVT_TREE_SEL_CHANGED and EVT_TREE_BEGIN_DRAG events and also
mouse click in general

Look for wx.GetMouseState() and wx.GetKeyState(wx.WXK_SOMEKEY).

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

Hi Phil,

Thanks for that doesnt looks like there is one for tree events.
Any way i could achieve this.

···

###########
File "E:\Thomas\development\python\DocsBoxWidget-v5\gui\mainFrame.py", line 5607, in OnTreeCtrl1TreeBeginDrag
    controlDown = event.ControlDown()
AttributeError: 'TreeEvent' object has no attribute 'ControlDown'
#############

Thanks
Thomas

Thanks a lot Andrea,

That worked sweet.

Cheers
Thomas