Meta+Shift+E won't register as a KeyDown Event (at least on OSX)

78 views
Skip to first unread message

Jake Rosch

unread,
Jul 27, 2016, 1:41:27 AM7/27/16
to Chromium-discuss
I was creating keyboard shortcuts for a webpage I am making, and I wanted Command(or Ctrl on Windows)+E to clear a row, and Command(or Ctrl on Windows)+Shift+E to remove a row. Command+E worked fine, while Command+Shift+E won't register. I used the following code in my console to test if it is Command+Shift+(any key), but I found it is only E.

document.addEventListener('keydown', function(event) {
    event.preventDefault(); 
    
    //if Command is pressed, and Shift is pressed, and the triggered event is NOT the Command or Shift key
    if (event.metaKey && event.shiftKey && [16,91].indexOf(event.keyCode) === -1)
        console.log(event); //log the event
    
});


I believe this is an issue with Chrome because:

- Command+Shift+E doesn't do anything special in Chrome
- but, on the other hand, Command+Shift+R force reloads the page, yet registers as an event
- it works fine on both Firefox and Safari

I haven't tested this yet on Windows using the Control key.

Mac OS X 10.11.5 running Chrome 52.0.2743.82

PhistucK

unread,
Jul 27, 2016, 1:46:36 AM7/27/16
to jake...@gmail.com, Chromium-discuss
You can search crbug.com for an existing issue and star it. If you cannot find one, file a new issue using the "New issue" link on the same page.
Please, do not add a "+1" or "Me too" or "Confirmed" (or similar) comment. It just wastes the time of Chrome engineers and sends unnecessary e-mails to all of the people who starred the issue.

You can reply with a link to the found or created issue and might get triaged (and fixed) faster.

Thank you.



PhistucK

--
--
Chromium Discussion mailing list: chromium...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

---
You received this message because you are subscribed to the Google Groups "Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discu...@chromium.org.

Nance, Aaron

unread,
Jul 27, 2016, 11:30:16 AM7/27/16
to PhistucK Productions, jake...@gmail.com, Chromium-discuss
I was curious about this since I do a lot of keyboard JS. For me your example works with Shift+Meta+E. I am on the same version of OSX and the same version of Chrome. So it may not be the browser.
--

Aaron Nance

Software Developer

Assessment & Instruction

Pearson


E: aaron...@pearson.com


Pearson

Always Learning

Learn more at www.pearsonk12.com

Jamie Walch

unread,
Jul 27, 2016, 5:55:26 PM7/27/16
to aaron...@pearson.com, PhistucK Productions, jake...@gmail.com, Chromium-discuss
You can use https://dvcs.w3.org/hg/d4e/raw-file/tip/key-event-test.html to check what events the browser is firing. If you can repro the bug using that site, it will be easier to debug it. If you can't then there's probably some unintended side-effect in your app.

PhistucK

unread,
Jul 28, 2016, 8:28:24 AM7/28/16
to Peter Rood, Jamie Walch, Aaron Nance, Jake Rosch, Chromium-discuss
Works for me.


PhistucK

On Thu, Jul 28, 2016 at 3:04 PM, Peter Rood <pe...@peterood.com> wrote:
Is https://dvcs.w3.org/hg/d4e/raw-file/tip/key-event-test.html offline for anyone else?
$ dig dvcs.w3.org returned ;; connection timed out; no servers could be reachedScreenshot 2016-07-28 08.00.59.png

Peter Rood

unread,
Jul 28, 2016, 8:50:19 AM7/28/16
to jamie...@chromium.org, aaron...@pearson.com, PhistucK Productions, jake...@gmail.com, Chromium-discuss
$ dig dvcs.w3.org returned ;; connection timed out; no servers could be reachedScreenshot 2016-07-28 08.00.59.png


On Wed, Jul 27, 2016 at 5:55 PM Jamie Walch <jamie...@chromium.org> wrote:

Peter Rood

unread,
Jul 28, 2016, 12:47:04 PM7/28/16
to PhistucK, Jamie Walch, Aaron Nance, Jake Rosch, Chromium-discuss
Thanks, works on my work laptop/connection.
Reply all
Reply to author
Forward
0 new messages