#13695: [Cocoa] wxGetKeyState and Command

5 views
Skip to first unread message

wxTrac

unread,
Nov 27, 2011, 4:44:46 PM11/27/11
to wx-...@googlegroups.com
Ticket URL: <http://trac.wxwidgets.org/ticket/13695>

#13695: [Cocoa] wxGetKeyState and Command
-------------------------+--------------------------------------------------
Reporter: Auria | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: wxOSX-Cocoa | Version: 2.9-svn
Keywords: | Blockedby:
Patch: 0 | Blocking:
-------------------------+--------------------------------------------------
on wxOSX/Cocoa 2.9 svn (r69318), there appears to be now way to detect
using wxGetKeyState whether the command key is down.

wxGetKeyState(WXK_COMMAND) will return true is control is down
the only other idea I have was wxGetKeyState(WXK_WINDOWS_LEFT) but it
always returns false

(untested with carbon)


--
Ticket URL: <http://trac.wxwidgets.org/ticket/13695>

wxTrac

unread,
Nov 27, 2011, 4:54:29 PM11/27/11
to wx-...@googlegroups.com
Ticket URL: <http://trac.wxwidgets.org/ticket/13695#comment:1>

#13695: [Cocoa] wxGetKeyState and Command

--------------------------+-------------------------------------------------
Reporter: Auria | Owner:
Type: defect | Status: closed

Priority: normal | Milestone:
Component: wxOSX-Cocoa | Version: 2.9-svn

Resolution: invalid | Keywords:
Blockedby: | Patch: 0
Blocking: |
--------------------------+-------------------------------------------------
Changes (by Auria):

* status: new => closed
* resolution: => invalid


Comment:

Alright, nevermind. I finally found it by looking through the code. It's
WXK_MENU

Though that's sort of non-obvious, maybe it could be documented better.
But it does work
(I have seen some libraries work around this confusing by having a key
named something like WXK_LOGO_LEFT, where 'logo' is the Windows logo on
windows, or the Apple logo on a mac keyboard). But for now closing this
ticket, reopen if you agree better documentation is warranted


--
Ticket URL: <http://trac.wxwidgets.org/ticket/13695#comment:1>

wxTrac

unread,
Nov 27, 2011, 6:53:17 PM11/27/11
to wx-...@googlegroups.com
Ticket URL: <http://trac.wxwidgets.org/ticket/13695#comment:2>

#13695: [Cocoa] wxGetKeyState and Command

--------------------------+-------------------------------------------------
Reporter: Auria | Owner:
Type: defect | Status: reopened
Priority: low | Milestone:
Component: wxOSX-Cocoa | Version: 2.9-svn
Resolution: | Keywords:
Blockedby: | Patch: 0
Blocking: |
--------------------------+-------------------------------------------------
Changes (by vadz):

* priority: normal => low
* status: closed => reopened
* resolution: invalid =>


Comment:

I'd never expect `WXK_MENU` to work for this. This really does need to be
documented if it's intentional or changed if it isn't (as I actually
hope...).

Stefan, is this really meant to work like this?


--
Ticket URL: <http://trac.wxwidgets.org/ticket/13695#comment:2>

wxTrac

unread,
Nov 28, 2011, 1:52:34 AM11/28/11
to wx-...@googlegroups.com
Ticket URL: <http://trac.wxwidgets.org/ticket/13695#comment:3>

#13695: [Cocoa] wxGetKeyState and Command

--------------------------+-------------------------------------------------
Reporter: Auria | Owner: csomor
Type: defect | Status: accepted
Priority: low | Milestone:
Component: wxOSX-Cocoa | Version: 2.9-svn
Resolution: | Keywords:
Blockedby: | Patch: 0
Blocking: |
--------------------------+-------------------------------------------------
Changes (by csomor):

* owner: => csomor
* status: reopened => accepted


Comment:

no, this isn't correct, I once had MENU mapped to option long time ago,
but now everything has to be in line with the new control/rawControl
naming


--
Ticket URL: <http://trac.wxwidgets.org/ticket/13695#comment:3>

wxTrac

unread,
Jan 2, 2012, 12:14:01 PM1/2/12
to wx-...@googlegroups.com
Ticket URL: <http://trac.wxwidgets.org/ticket/13695#comment:4>

#13695: [Cocoa] wxGetKeyState and Command

--------------------------+-------------------------------------------------
Reporter: Auria | Owner: csomor
Type: defect | Status: accepted

Priority: low | Milestone:
Component: wxOSX-Cocoa | Version: 2.9-svn
Resolution: | Keywords:
Blockedby: | Patch: 1

Blocking: |
--------------------------+-------------------------------------------------
Changes (by Auria):

* patch: 0 => 1


Comment:

I have attached a patch that both corrects the issue and explains what
constant to use in the docs (which is currently lacking)


--
Ticket URL: <http://trac.wxwidgets.org/ticket/13695#comment:4>

wxTrac

unread,
Jan 2, 2012, 7:24:53 PM1/2/12
to wx-...@googlegroups.com
Ticket URL: <http://trac.wxwidgets.org/ticket/13695#comment:5>

#13695: [Cocoa] wxGetKeyState and Command

--------------------------+-------------------------------------------------
Reporter: Auria | Owner: csomor
Type: defect | Status: accepted

Priority: low | Milestone: 2.9.4

Component: wxOSX-Cocoa | Version: 2.9-svn
Resolution: | Keywords:
Blockedby: | Patch: 1
Blocking: |
--------------------------+-------------------------------------------------

Changes (by vadz):

* milestone: => 2.9.4


Comment:

Thanks! This looks ok to apply to me. Stefan, any objections?


--
Ticket URL: <http://trac.wxwidgets.org/ticket/13695#comment:5>

wxTrac

unread,
Jan 3, 2012, 5:34:16 AM1/3/12
to wx-...@googlegroups.com
Ticket URL: <http://trac.wxwidgets.org/ticket/13695#comment:6>

#13695: [Cocoa] wxGetKeyState and Command

--------------------------+-------------------------------------------------
Reporter: Auria | Owner: csomor
Type: defect | Status: accepted
Priority: low | Milestone: 2.9.4
Component: wxOSX-Cocoa | Version: 2.9-svn
Resolution: | Keywords:
Blockedby: | Patch: 1
Blocking: |
--------------------------+-------------------------------------------------

Comment(by SC):

(In [70251]) adapting to new raw_control constants, see #13695


--
Ticket URL: <http://trac.wxwidgets.org/ticket/13695#comment:6>

wxTrac

unread,
Jan 3, 2012, 5:41:54 AM1/3/12
to wx-...@googlegroups.com
Ticket URL: <http://trac.wxwidgets.org/ticket/13695#comment:7>

#13695: [Cocoa] wxGetKeyState and Command

--------------------------+-------------------------------------------------
Reporter: Auria | Owner: csomor
Type: defect | Status: accepted
Priority: low | Milestone: 2.9.4
Component: wxOSX-Cocoa | Version: 2.9-svn
Resolution: | Keywords:
Blockedby: | Patch: 1
Blocking: |
--------------------------+-------------------------------------------------

Comment(by csomor):

I've applied an extended version which I had in my sandbox, and I'll apply
the doc patch now, thanks Auria


--
Ticket URL: <http://trac.wxwidgets.org/ticket/13695#comment:7>

wxTrac

unread,
Jan 3, 2012, 5:53:14 AM1/3/12
to wx-...@googlegroups.com
Ticket URL: <http://trac.wxwidgets.org/ticket/13695#comment:8>

#13695: [Cocoa] wxGetKeyState and Command

--------------------------+-------------------------------------------------
Reporter: Auria | Owner: csomor

Type: defect | Status: closed

Priority: low | Milestone: 2.9.4
Component: wxOSX-Cocoa | Version: 2.9-svn

Resolution: fixed | Keywords:

Blockedby: | Patch: 1
Blocking: |
--------------------------+-------------------------------------------------

Changes (by SC):

* status: accepted => closed
* resolution: => fixed


Comment:

(In [70252]) fixes #13695


--
Ticket URL: <http://trac.wxwidgets.org/ticket/13695#comment:8>

wxTrac

unread,
Jan 4, 2012, 11:11:27 AM1/4/12
to wx-...@googlegroups.com
Ticket URL: <http://trac.wxwidgets.org/ticket/13695#comment:9>

#13695: [Cocoa] wxGetKeyState and Command

--------------------------+-------------------------------------------------
Reporter: Auria | Owner: csomor
Type: defect | Status: closed
Priority: low | Milestone: 2.9.4
Component: wxOSX-Cocoa | Version: 2.9-svn
Resolution: fixed | Keywords:
Blockedby: | Patch: 1
Blocking: |
--------------------------+-------------------------------------------------

Comment(by Auria):

I'm sorry, I just found a mistake in my docs patch *blush*

atm it says 'WXK_RAW_CONTROL ... Under Windows/Linux/Others, this is
equivalent to WXK_RAW_CONTROL '

obviously this should have been

'WXK_RAW_CONTROL ... Under Windows/Linux/Others, this is equivalent to
WXK_CONTROL '


--
Ticket URL: <http://trac.wxwidgets.org/ticket/13695#comment:9>

wxTrac

unread,
Jan 4, 2012, 1:18:27 PM1/4/12
to wx-...@googlegroups.com
Ticket URL: <http://trac.wxwidgets.org/ticket/13695#comment:10>

#13695: [Cocoa] wxGetKeyState and Command

--------------------------+-------------------------------------------------
Reporter: Auria | Owner: csomor
Type: defect | Status: closed
Priority: low | Milestone: 2.9.4
Component: wxOSX-Cocoa | Version: 2.9-svn
Resolution: fixed | Keywords:
Blockedby: | Patch: 1
Blocking: |
--------------------------+-------------------------------------------------

Comment(by disc):

I happened to notice the minor mistake and had changed it locally. I'll
commit it later as part of a commit with other typos.


--
Ticket URL: <http://trac.wxwidgets.org/ticket/13695#comment:10>

Reply all
Reply to author
Forward
0 new messages