# Pressing the 0 key while holding control and shift doesn't cause keyPressed to be called

**URL:** <https://discourse.processing.org/t/pressing-the-0-key-while-holding-control-and-shift-doesnt-cause-keypressed-to-be-called/33578>\
**Category:** p5.js\
**Created:** [November 17, 2021, 7:03pm UTC](https://discourse.processing.org/t/pressing-the-0-key-while-holding-control-and-shift-doesnt-cause-keypressed-to-be-called/33578 "2021-11-17T19:03:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![modusponens](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/modusponens/32/13888_2.png) [@modusponens](https://discourse.processing.org/u/modusponens)\
**Post date:** [November 17, 2021, 7:03pm UTC](https://discourse.processing.org/t/pressing-the-0-key-while-holding-control-and-shift-doesnt-cause-keypressed-to-be-called/33578/1 "2021-11-17T19:03:07Z")

</div>

Just as the topic title says, the 0 (zero) key doesn’t seem to cause `keyPressed` to be called while you’re holding the control and shift keys. It does get called if you press 0 while you’re holding either control or shift but not both, and it does get called if you press other keys while holding control and shift. I tested this in Chrome and Firefox. Is this some key combo that p5 reserves?

---

<div class="post-metadata">

**Author:** ![KumuPaul](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kumupaul/32/13072_2.png) [@KumuPaul](https://discourse.processing.org/u/KumuPaul)\
**Post date:** [November 18, 2021, 12:05am UTC](https://discourse.processing.org/t/pressing-the-0-key-while-holding-control-and-shift-doesnt-cause-keypressed-to-be-called/33578/2 "2021-11-18T00:05:18Z")

</div>

There are definitely certain key combinations on certain browsers that either do not fire at all or don’t fire in the normal way (for example on my browser (Brave on Mac OS X) Control+Shift+0 works normally, but Command+0 only fires the first time it is pressed, and Shift+Command+0 doesn’t work at all. The website [https://keycode.info/](https://keycode.info/) however, does respond to these keypresses normally, so it must be subscribing to the keyboard events in some other way.

If you are creating a sketch with lots of keybindings it would be wise to detect to OS you are on and select a keyboard shortcut scheme that does not conflict with common OS shortcuts.

https://openprocessing.org/sketch/1358478/embed/?plusEmbedHash=MDY2ZGZhZDFhNjUxZjIxNjA1MGI5NmM0MDcwYzdkY2I1YjkyNjZhYmIzYjkxMWNiNjY0YmYwYjYzNTU2YjZkNjM5MDBmMzJlNzI2YjUxMTExYjE1NjM2YWQ1MDQ2YWEyMDM3NzJjMDJmNzEwMjg5ZmFhZmM5MzRmMjViZGQxY2J1Q0dvcXE5ajJMMkNoSjhVMnIySkZRRlhtZmZnY3hzck1MMlJ2Z3NiNWtXNmppbTlIZkJ1dWRVWjB5aHU4WUFLUjhHL2RBMW5WQS84d3A4TjROcXlpZz09

---

<div class="post-metadata">

**Author:** ![modusponens](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/modusponens/32/13888_2.png) [@modusponens](https://discourse.processing.org/u/modusponens)\
**Post date:** [November 20, 2021, 7:53am UTC](https://discourse.processing.org/t/pressing-the-0-key-while-holding-control-and-shift-doesnt-cause-keypressed-to-be-called/33578/3 "2021-11-20T07:53:07Z")

</div>

Huh, okay, so the browser just kinda doesn’t want me to do that, then. Well, thanks!
