Define Pause Key for Arduino Leonardo

Hi Team,
I am doing a Gaming device automation project, where i am configuring Arduino Leonardo board as keyboard and using it to control the options in gaming console.

Good thing is most of the options are working fine with the keyboard keys defined in keyboard.h header file. (example keys like left, right, up, down, f3, s, Esc, Enter etc).

The help I need is to configure the control Key "PAUSE". I can press PAUSE key in actual keyboards like Microsoft, Lenovo and it works as the "PS" for gaming console and it returns to the home page.
But I am either struggling to configure the right key or it is like Arduino Leonardo is not behaving like the other actual keyboards are working when PAUSE key is pressed.

I have gone through lot of responses in Arduino community where many have given some good suggestions and i have tried to configure the below keys and tried it to act as PS key when PAUSE is pressed. But its not working. I am struck here as PS key is important key in my Automation, even though other keys work fine.

can someone help me in this please if you can, will be a great help.

Keys defined as pause and tried are as below [ofcourse one at a time :)]
#define KEY_PAUSE 179
#define KEY_PAUSE 176
#define KEY_PAUSE 177
#define KEY_PAUSE 179
#define KEY_PAUSE 181
#define KEY_PAUSE 182
#define KEY_PAUSE 184
#define KEY_PAUSE 198
#define KEY_PAUSE 205
#define KEY_PAUSE 208
#define KEY_PAUSE 213

Thanks

According to the docs: Keyboard Modifiers and Special Keys - Arduino Reference
KEY_LEFT_CTRL == 0x80
KEY_LEFT_CTRL == 0x84

without showing us your code, I can't guess any more..

Has anyone solved this? I'm also looking to get an Arduino to reproduce the "PAUSE" or "BREAK" key on a keyboard.

I know the hex code for PAUSE is 0x13, and 19 in Decimal but despite this I have not been able to get a keyboard.press(KEY_PAUSE) event to trigger that key with:

#define KEY_PAUSE 19
or
#define KEY_PAUSE 0x13

Anyone know how to do this?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.