简体   繁体   中英

C# Detect macro buttons from keyboard console app

I was planing on making a simple console app to run in the background at all time. I want to run a function based by key press and I need a button(s) that is not in use. So tried to get the app to react on macro key presses but cant figure out how to do it. The basic stuff like ReadLine key.. etc is not working

(It's the 5 extra buttons on the left)

在此处输入图片说明

Looking at your picture I think we are talking about a Razer Keyboard here.
I have the same one and when I look into the Synapse Software to see what the macro buttons actually do, I see that they are disabled by the default

You can configure them to press a certain key, key combo or something like that.
So my approach would be to configure the macro to some kind of key-combo and listen for that in your app. (Obviously this would only work on your machine and require extra setup for any other user using your tool)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM