# Microsoft Number Pad triggering Cancel Button

**URL:** <https://forum.xojo.com/t/microsoft-number-pad-triggering-cancel-button/62900>\
**Category:** General\
**Created:** [April 22, 2021, 4:49pm UTC](https://forum.xojo.com/t/microsoft-number-pad-triggering-cancel-button/62900 "2021-04-22T16:49:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mark\_Sweeney](https://forum.xojo.com/user_avatar/forum.xojo.com/mark_sweeney/32/3332_2.png) [@Mark\_Sweeney](https://forum.xojo.com/u/Mark_Sweeney)\
**Post date:** [April 22, 2021, 4:49pm UTC](https://forum.xojo.com/t/microsoft-number-pad-triggering-cancel-button/62900/1 "2021-04-22T16:49:33Z")

</div>

I use a Bluetooth Microsoft Number Pad with my Mac. I have a container control with Text Fields, combine boxes, an OK button and the default Cancel button.

Whenever I try to type a number with the Microsoft Number Pad, the Cancel Button button is triggered.

I can work around it by turning off the Cancel option in the editor, but then keyboard shortcuts for cancel don’t work.

Any ideas how to get it working properly?

---

<div class="post-metadata">

**Author:** ![Rick\_Araujo](https://forum.xojo.com/user_avatar/forum.xojo.com/rick_araujo/32/251_2.png) [@Rick\_Araujo](https://forum.xojo.com/u/Rick_Araujo)\
**Post date:** [April 22, 2021, 5:56pm UTC](https://forum.xojo.com/t/microsoft-number-pad-triggering-cancel-button/62900/2 "2021-04-22T17:56:56Z")

</div>

Seems incompatible. [Microsoft Bluetooth Keyboard Number Pad Not Working - Microsoft Community](https://answers.microsoft.com/en-us/windows/forum/windows_other-hardware/microsoft-bluetooth-keyboard-number-pad-not/ee79c34b-1123-4aa8-a0ae-1b32a9bbcb40)

---

<div class="post-metadata">

**Author:** ![Mark\_Sweeney](https://forum.xojo.com/user_avatar/forum.xojo.com/mark_sweeney/32/3332_2.png) [@Mark\_Sweeney](https://forum.xojo.com/u/Mark_Sweeney)\
**Post date:** [April 22, 2021, 6:57pm UTC](https://forum.xojo.com/t/microsoft-number-pad-triggering-cancel-button/62900/3 "2021-04-22T18:57:33Z")

</div>

t looks like the number pad fires two KeyDown events - one with ASCII 63289, and the other for the key pressed.

The 63289 is the one triggering the Cancel Button.

---

<div class="post-metadata">

**Author:** ![Mark\_Sweeney](https://forum.xojo.com/user_avatar/forum.xojo.com/mark_sweeney/32/3332_2.png) [@Mark\_Sweeney](https://forum.xojo.com/u/Mark_Sweeney)\
**Post date:** [April 22, 2021, 7:08pm UTC](https://forum.xojo.com/t/microsoft-number-pad-triggering-cancel-button/62900/4 "2021-04-22T19:08:53Z")

</div>

I was able to figure it out with Karabiner Elements - an app for remapping keys. When you use the number pad it sends two key presses - on for “keypad\_num\_lock” and one for the key pressed.

In Karabiner Elements I remapped the “keypad\_num\_lock” to "vk\_none (disable this key) and it stopped triggering the Cancel Button while still sending the key pressed.

---

<div class="post-metadata">

**Author:** ![Arnaud\_N](https://forum.xojo.com/user_avatar/forum.xojo.com/arnaud_n/32/21824_2.png) [@Arnaud\_N](https://forum.xojo.com/u/Arnaud_N)\
**Post date:** [April 22, 2021, 9:34pm UTC](https://forum.xojo.com/t/microsoft-number-pad-triggering-cancel-button/62900/5 "2021-04-22T21:34:25Z")

</div>

> [@Mark\_Sweeney](#):
>
> In Karabiner Elements I remapped the “keypad\_num\_lock” to "vk\_none (disable this key) and it stopped triggering the Cancel Button while still sending the key pressed.

I remember, in Mac OS 9 and early OS X (IIRC), the num lock key was reliably useable to cancel things, doing the same as the Esc key.  
I’m not surprised this relation still exists today, though I can’t explain it clearly (and why it’s not always behaving like that is also vague).
