# Any way to check if modifiers used with keys

**URL:** <https://discourse.glfw.org/t/any-way-to-check-if-modifiers-used-with-keys/1938>\
**Category:** support\
**Created:** [November 14, 2021, 7:43am UTC](https://discourse.glfw.org/t/any-way-to-check-if-modifiers-used-with-keys/1938 "2021-11-14T07:43:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jackywhite](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.glfw.org/jackywhite/32/567_2.png) [@jackywhite](https://discourse.glfw.org/u/jackywhite)\
**Post date:** [November 14, 2021, 7:43am UTC](https://discourse.glfw.org/t/any-way-to-check-if-modifiers-used-with-keys/1938/1 "2021-11-14T07:43:20Z")

</div>

We can check for modifiers when using callbacks with keys. But is there any way to do this with `glfwGetKey`? Or do you have to work around it with something like this `glfwGetKey(window, GLFW_KEY_E) && glfwGetKey(window, GLFW_KEY_LEFT_SHIFT)`?

---

<div class="post-metadata">

**Author:** ![dougbinks](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.glfw.org/dougbinks/32/39_2.png) [@dougbinks](https://discourse.glfw.org/u/dougbinks)\
**Post date:** [November 14, 2021, 3:38pm UTC](https://discourse.glfw.org/t/any-way-to-check-if-modifiers-used-with-keys/1938/2 "2021-11-14T15:38:47Z")

</div>

The only way to check for modifiers is indeed to check for all modifier keys using their key tokens.

You could potentially store the state from the callback and implement your own `GetKeyModifiers` function.
