| Newsgroups |
gmane.comp.python.wxpython |
| Message-ID |
<[email protected]> |
------=_Part_5064_317602639.1650327772791
Content-Type: multipart/alternative;
boundary="----=_Part_5065_198880565.1650327772791"
------=_Part_5065_198880565.1650327772791
Content-Type: text/plain; charset="UTF-8"
wxPython 4.1.1
Run wxdemo on Windows 7 or 10, pull up the KeyEvent demo.
Press Ctrl-Alt-Enter on your PC keyboard, and you'll see this:
*Event Type Key Name Key Code Modifiers*KeyDown
WXK_ALT 307 -A---
KeyDown WXK_CONTROL 308 CA--R
*KeyDown WXK_RETURN 13 CA--R*
KeyUp WXK_RETURN 13 CA--R
KeyUp WXK_CONTROL 308 -A---
KeyUp WXK_ALT 307 -----
Noticed highlighted KeyDown event for Enter with Ctrl + Alt pressed, which
is what I'd expect.
Run the same demo on macOS 10.15 or 11, this time pressing
Command+Ctrl+Enter:
*Event Type Key Name Key Code Modifiers*
KeyDown WXK_COMMAND 308 C----
KeyDown WXK_RAW_CONTROL 396 C---R
*<--- no KeyDown for 13 with C---R? --> *
KeyUp WXK_RETURN 13 C---R
KeyUp WXK_COMMAND 308 ----R
KeyUp WXK_RAW_CONTROL 396 -----
... there's no KeyDown for the return key with CR modifiers. Why not? Is
that a bug?
I thought this might be something about macOS -- but here's a simple web
page that grabs key events in
Javascript: https://unixpapa.com/js/testkey.html
For Windows it shows what we'd expect: keydown 13, ctrl/alt true.
keydown keyCode=13 which=13 charCode=0
shiftKey=false ctrlKey=true altKey=true metaKey=false
For mac - also exactly what I'd expect: keydown for 13, ctrl/meta true.
keydown keyCode=13 which=13 charCode=0
shiftKey=false ctrlKey=true altKey=false metaKey=true
So it would appears other applications (at least, browser) can see that
event just fine.
Why can't wxPython see a KeyDown for Enter with Command and Control both
pressed on macos?
Thanks for any pointers or workarounds:
-ck
--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/wxpython-users/34b20ba1-1fba-4f82-b2f0-78f4d36f7fd9n%40googlegroups.com.
------=_Part_5065_198880565.1650327772791
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
wxPython 4.1.1<div><br><div>Run wxdemo on Windows 7 or 10, pull up the KeyE=
vent demo.</div><div>Press Ctrl-Alt-Enter on your PC keyboard, and you'll s=
ee this:</div><div><br></div><font face=3D"Courier New"><u>Event Type  =
; Key Name Key Code &=
nbsp; Modifiers<br></u>KeyDown WXK_ALT &n=
bsp; 307 -A-=
--<br>KeyDown WXK_CONTROL 308 &nb=
sp; CA--R<br><b><font style=3D"backgroun=
d-color: yellow;" color=3D"#000000">KeyDown WXK=
_RETURN 13 &n=
bsp;CA--R</font></b><br>KeyUp WXK_RETURN=
13 CA-=
-R<br>KeyUp WXK_CONTROL 30=
8 -A---<br>KeyUp &n=
bsp; WXK_ALT 307 &n=
bsp; -----<br></font><div><br></div><div>Noticed highl=
ighted KeyDown event for Enter with Ctrl + Alt pressed, which is what I'd e=
xpect.</div><div><br></div><div>Run the same demo on macOS 10.15 or 11, thi=
s time pressing Command+Ctrl+Enter:</div><div><br></div><div><font face=3D"=
Courier New"><u>Event Type Key Name  =
; Key Code Modifiers</u><br>KeyDown =
WXK_COMMAND 308 &n=
bsp; C----<br>KeyDown WXK_RAW_CON=
TROL 396 C---R</font></div><div><=
font face=3D"Courier New"><span style=3D"background-color: yellow;"> =
<b><--- no KeyDown for 13 with C---R? --> </=
b></span><br>KeyUp WXK_RETURN &nb=
sp; 13 C---R<br>KeyUp=
WXK_COMMAND 308 &n=
bsp; ----R<br>KeyUp =
WXK_RAW_CONTROL 396 -----=
<br></font></div><div><font face=3D"Courier New"><br></font></div><div>... =
there's no KeyDown for the return key with CR modifiers. Why not? Is that a=
bug?</div><div><br></div><div>I thought this might be something about macO=
S -- but here's a simple web page that grabs key events in Javascript: =
;https://unixpapa.com/js/testkey.html</div><div><br></div><div>For Windows =
it shows what we'd expect: keydown 13, ctrl/alt true.</div><div><br></div><=
div><font face=3D"Courier New">keydown keyCode=3D13 &nb=
sp; which=3D13 charCode=3D0 =
<br> shiftKey=3Dfalse ctrlKey=
=3Dtrue altKey=3Dtrue metaKey=3Dfalse<br></font></div><div><br>=
</div><div>For mac - also exactly what I'd expect: keydown for 13, ctrl/met=
a true.</div><div><br></div><div><font face=3D"Courier New">keydown k=
eyCode=3D13 which=3D13 &nbs=
p;charCode=3D0 <br> &=
nbsp;shiftKey=3Dfalse ctrlKey=3Dtrue altKey=3Dfalse metaKey=3Dtrue&nb=
sp;</font><br></div><div><br></div><div>So it would appears other applicati=
ons (at least, browser) can see that event just fine.</div><div><br></div><=
div>Why can't wxPython see a KeyDown for Enter with Command and Control bot=
h pressed on macos?</div><div><br></div><div>Thanks for any pointers or wor=
karounds:</div><div>-ck</div><div><br></div><div><br></div></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;wxPython-users" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:[email protected]">wxpy=
[email protected]</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/d/msgid/wxpython-users/34b20ba1-1fba-4f82-b2f0-78f4d36f7fd9n%40googlegro=
ups.com?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.com/d=
/msgid/wxpython-users/34b20ba1-1fba-4f82-b2f0-78f4d36f7fd9n%40googlegroups.=
com</a>.<br />
------=_Part_5065_198880565.1650327772791--
------=_Part_5064_317602639.1650327772791--