Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion WXK_COMMAND

Received: by 10.180.73.242 with SMTP id o18mr388943wiv.0.1348919674669;
        Sat, 29 Sep 2012 04:54:34 -0700 (PDT)
X-BeenThere: wxpython-users@googlegroups.com
Received: by 10.180.76.178 with SMTP id l18ls3306645wiw.4.canary; Sat, 29 Sep
 2012 04:54:25 -0700 (PDT)
Received: by 10.180.91.231 with SMTP id ch7mr568849wib.1.1348919665843;
        Sat, 29 Sep 2012 04:54:25 -0700 (PDT)
Received: by 10.180.91.231 with SMTP id ch7mr568848wib.1.1348919665833;
        Sat, 29 Sep 2012 04:54:25 -0700 (PDT)
Return-Path: <gcpw-wxpython-users-...@m.gmane.org>
Received: from riobu.com (riobu.com. [85.234.147.122])
        by gmr-mx.google.com with ESMTP id bu8si236120wib.2.2012.09.29.04.54.25;
        Sat, 29 Sep 2012 04:54:25 -0700 (PDT)
Received-SPF: fail (google.com: domain of gcpw-wxpython-users-...@m.gmane.org does not designate 85.234.147.122 as permitted sender) client-ip=85.234.147.122;
Authentication-Results: gmr-mx.google.com; spf=hardfail (google.com: domain of gcpw-wxpython-users-...@m.gmane.org does not designate 85.234.147.122 as permitted sender) smtp.mail=gcpw-wxpython-users-...@m.gmane.org
Received: from plane.gmane.org (plane.gmane.org [80.91.229.3])
	by riobu.com (Postfix) with ESMTPS id 75235ABF859D
	for <wxpython-us...@lists.wxwidgets.org>; Sat, 29 Sep 2012 04:54:25 -0700 (PDT)
Received: from list by plane.gmane.org with local (Exim 4.69)
	(envelope-from <gcpw-wxpython-users-...@m.gmane.org>)
	id 1THvco-0000aQ-Sz
	for wxpython-us...@lists.wxwidgets.org; Sat, 29 Sep 2012 13:54:26 +0200
Received: from 201.250.107.217 ([201.250.107.217])
        by main.gmane.org with esmtp (Gmexim 0.1 (Debian))
        id 1AlnuQ-0007hv-00
        for <wxpython-us...@lists.wxwidgets.org>; Sat, 29 Sep 2012 13:54:26 +0200
Received: from ckkart by 201.250.107.217 with local (Gmexim 0.1 (Debian))
        id 1AlnuQ-0007hv-00
        for <wxpython-us...@lists.wxwidgets.org>; Sat, 29 Sep 2012 13:54:26 +0200
X-Injected-Via-Gmane: http://gmane.org/
To: wxpython-us...@lists.wxwidgets.org
From: "Christian K." <ckk...@hoc.net>
Subject: Re: WXK_COMMAND
Date: Sat, 29 Sep 2012 08:54:09 -0300
Lines: 19
Message-ID: <k46ngv$th...@ger.gmane.org>
References: <k3bagg$o8...@ger.gmane.org> <505A0FB5.50...@alldunn.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: use...@ger.gmane.org
X-Gmane-NNTP-Posting-Host: 201.250.107.217
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:15.0) Gecko/20120907 Thunderbird/15.0.1
In-Reply-To: <505A0FB5.50...@alldunn.com>

Am 19.09.12 15:32, schrieb Robin Dunn:
> On 9/18/12 7:26 PM, Christian K. wrote:
>> Hi,
>>
>> I am unable to check whether the command key is currently pressed using
>> wx.GetKeyState(wx.WXK_COMMAND) within an TREE_SEL_CHANGING handler.
>> The result is always False. What should I try instead?
>> This happens on Os X 10.8 running python 2.7 with wxpython 2.8.12.1
>
> Try using wx.GetMouseState instead.  Although it is mostly about the
> mouse position and button states it does include methods and properties
> for the keyboard modifier keys as well.  I don't remember about 2.8 for
> sure but it does correctly report shift, ctrl, cmd, and alt for
> wxOSX-cocoa 2.9.

Thanks! This works with both 2.8 and 2.9.

Christian