# How to map numlock to open calculator?

**URL:** <https://community.keyboard.io/t/how-to-map-numlock-to-open-calculator/1479>\
**Category:** Help and Getting Started\
**Tags:** question\
**Created:** [May 8, 2018, 2:20am UTC](https://community.keyboard.io/t/how-to-map-numlock-to-open-calculator/1479 "2018-05-08T02:20:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bnonn](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/bnonn/32/1283_2.png) [@bnonn](https://community.keyboard.io/u/bnonn)\
**Post date:** [May 8, 2018, 2:20am UTC](https://community.keyboard.io/t/how-to-map-numlock-to-open-calculator/1479/1 "2018-05-08T02:20:59Z")

</div>

I apologize if I’ve missed something obvious; I’ve searched for an answer to this question, but the only likely culprit looked like the code `Consumer_AL_Calculator` in the key\_defs\_consumerctl.h keymap ([https://github.com/keyboardio/Kaleidoscope/blob/master/src/key\_defs\_consumerctl.h](https://github.com/keyboardio/Kaleidoscope/blob/master/src/key_defs_consumerctl.h)). I duly tried replacing `LockLayer(NUMPAD)` in the keymap with this code, but upon uploading to the keyboard, the numlock key now just does nothing (when I tried just remapping the open calculator command to whatever numlock now is, Ubuntu didn’t even register a keypress).

I don’t use keypad numbers, and never have, but I do find it very useful to have a shortcut key for opening my calculator. Can anyone help me with this minor but annoying problem?

---

<div class="post-metadata">

**Author:** ![rumpel](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/rumpel/32/626_2.png) [@rumpel](https://community.keyboard.io/u/rumpel)\
**Post date:** [May 9, 2018, 12:45pm UTC](https://community.keyboard.io/t/how-to-map-numlock-to-open-calculator/1479/2 "2018-05-09T12:45:06Z")

</div>

If you are using Windows, you can use [https://autohotkey.com/](https://autohotkey.com/)

Have your keyboard send a keycode (like F13 (yeah, it doesn’t end at F12)). That keycode is interpreted by AHK, which then starts your calculator.

AHK is extremely powerful, I use it for all kinds of commands and tasks and what not.

In your keymap, replace LockLayer(NUMPAD) with Key\_F13 and put this in your AHK script:

```
F13::Run "calc.exe"
```

---

<div class="post-metadata">

**Author:** ![rumpel](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/rumpel/32/626_2.png) [@rumpel](https://community.keyboard.io/u/rumpel)\
**Post date:** [May 9, 2018, 12:48pm UTC](https://community.keyboard.io/t/how-to-map-numlock-to-open-calculator/1479/3 "2018-05-09T12:48:17Z")

</div>

Some of the key definitions don’t do anything. Consumer\_AL\_Calculator might be one of them.

See [Key\_Cut/Copy/Paste and other keys in key\_defs\_keyboard.h](https://community.keyboard.io/t/key-cut-copy-paste-and-other-keys-in-key-defs-keyboard-h/1493/2)

---

<div class="post-metadata">

**Author:** ![bnonn](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/bnonn/32/1283_2.png) [@bnonn](https://community.keyboard.io/u/bnonn)\
**Post date:** [May 9, 2018, 10:54pm UTC](https://community.keyboard.io/t/how-to-map-numlock-to-open-calculator/1479/4 "2018-05-09T22:54:40Z")

</div>

Hrrm, I’m using Ubuntu, but at your suggestion I replaced numlock with F13. Ubuntu seems to interpret that as “Tools,” so I’ve remapped that to open calculator and it’s working perfectly. Thanks!

One odd thing for anyone else trying this in Ubuntu: for some reason I had to set the new key twice. The first time it said it had replaced the old shortcut, but hitting numlock didn’t actually do anything. So I went in again and this time it had a “Set” button instead of “Replace” for the keyboard shortcut, and setting it worked fine.

---

<div class="post-metadata">

**Author:** ![Wrongtown](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/wrongtown/32/2607_2.png) [@Wrongtown](https://community.keyboard.io/u/Wrongtown)\
**Post date:** [March 7, 2019, 7:18am UTC](https://community.keyboard.io/t/how-to-map-numlock-to-open-calculator/1479/5 "2019-03-07T07:18:06Z")

</div>

> [@rumpel](#):
>
> Some of the key definitions don’t do anything. Consumer\_AL\_Calculator might be one of them.

Just in case it’s useful for others looking this up in the future, I finally got around to doing this myself. **Consumer\_AL\_Calculator** worked fine for me on Windows 10 (in my case I replaced **Key\_Equals** when the **NUMPAD** keymap is active), so when I activate numpad the calculator is easily triggered 🙂
