# Ctrl + scroll for zoom not working from keyboard but working from mouse

**URL:** <https://community.keyboard.io/t/ctrl-scroll-for-zoom-not-working-from-keyboard-but-working-from-mouse/1649>\
**Category:** Help and Getting Started\
**Created:** [June 16, 2018, 6:58am UTC](https://community.keyboard.io/t/ctrl-scroll-for-zoom-not-working-from-keyboard-but-working-from-mouse/1649 "2018-06-16T06:58:52Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![algernon](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/algernon/32/4404_2.png) [@algernon](https://community.keyboard.io/u/algernon)\
**Post date:** [June 16, 2018, 9:55am UTC](https://community.keyboard.io/t/ctrl-scroll-for-zoom-not-working-from-keyboard-but-working-from-mouse/1649/2 "2018-06-16T09:55:22Z")

</div>

The `LCTRL()` macro only works for traditional keyboard keys. The reason for this is purely technical: we have keycodes on the keymap, which the firmware interprets. There’s only so much bits (16) per key, to describe what it does, and if we wanted to support `LCTRL` with mouse keys, we wouldn’t fit into 16 bits.

To achieve what you want, you can use a macro, like the following:

```auto
const macro_t *ctrlScroll(uint8_t keyState, uint8_t macroIndex) {
  Key direction = Key_mouseScrollDn;
  if (macroIndex == M_CTRL_SCROLLUP)
    direction = Key_mouseScrollUp;

  handleKeyswitchEvent(Key_LeftControl, Macros.row, Macros.col, keyState);
  handleKeyswitchEvent(direction, Macros.row, Macros.col, keyState);

  return MACRO_NONE;
}

```

…or something along these lines. I haven’t tested the above code, so it may be a little buggy. If it is, let me know, and I’ll help fixing it up.

---

_[View the full topic](https://community.keyboard.io/t/ctrl-scroll-for-zoom-not-working-from-keyboard-but-working-from-mouse/1649)._
