# Controll scroll event

**URL:** <https://discourse.glfw.org/t/controll-scroll-event/780>\
**Category:** support\
**Created:** [October 12, 2016, 11:37am UTC](https://discourse.glfw.org/t/controll-scroll-event/780 "2016-10-12T11:37:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ramsan](https://avatars.discourse-cdn.com/v4/letter/r/977dab/32.png) [@ramsan](https://discourse.glfw.org/u/ramsan)\
**Post date:** [October 12, 2016, 11:37am UTC](https://discourse.glfw.org/t/controll-scroll-event/780/1 "2016-10-12T11:37:06Z")

</div>

Hello,

How can the event “Ctrl-Mouse scroll” be managed with glfw?

Many programs, including web browsers, use this event to zoom the view. How can we emulate this in a glfw program?

---

<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:** [October 12, 2016, 11:54am UTC](https://discourse.glfw.org/t/controll-scroll-event/780/2 "2016-10-12T11:54:43Z")

</div>

In your [scroll callback](http://www.glfw.org/docs/latest/input_guide.html#scrolling) use [glfwGetKey()](http://www.glfw.org/docs/latest/group__input.html#gadd341da06bc8d418b4dc3a3518af9ad2) to check for GLFW\_KEY\_LEFT\_CONTROL or GLFW\_KEY\_RIGHT\_CONTROL being pressed.

---

<div class="post-metadata">

**Author:** ![ramsan](https://avatars.discourse-cdn.com/v4/letter/r/977dab/32.png) [@ramsan](https://discourse.glfw.org/u/ramsan)\
**Post date:** [October 12, 2016, 1:06pm UTC](https://discourse.glfw.org/t/controll-scroll-event/780/3 "2016-10-12T13:06:50Z")

</div>

> [@dougbinks](#):
>
> n your scroll callback use glfwGetKey() to check for GLFW\_KEY\_LEFT\_CONTROL or GLFW\_KEY\_RIGHT\_CONTROL being pressed.

Thanks. It worked perfectly.

---

<div class="post-metadata">

**Author:** ![elmindreda](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.glfw.org/elmindreda/32/26_2.png) [@elmindreda](https://discourse.glfw.org/u/elmindreda)\
**Post date:** [October 12, 2016, 5:06pm UTC](https://discourse.glfw.org/t/controll-scroll-event/780/4 "2016-10-12T17:06:04Z")

</div>

For 4.0 I’ll try not to forget to add modifier bits for scroll events. 😳
