简体   繁体   中英

C# - I want to get user input (from the background) from two keys on the numpad and make those inputs raise or lower an int counter

Basically, I'm using a Wacom tablet with PhotoShop at work. One thing I want to be able to do is cycle through the opacity stages with the keys 1-0.

The touch ring on the Wacom only accepts two inputs, obviously not enough for me to use.

I want to be able to (From the background, I want no user interface for this), create a simple counter, that goes up and down in ones. I want the "8" key on the numpad to raise this number, and the "2" key on the numpad to lower this number.

After the key has been pressed, and the counter has been modified to its new value, I want to have the value be simulated as a key press.

I started learning C# a long time ago, and have left it alone for an even longer time, I would like to use this project as a way to get back into using C#, to make little useful programs for myself for every day use.

Thanks in advance guys, I can't wait to see how this would actually be coded!

Please use Form.KeyPreview . You can find an example at https://msdn.microsoft.com/en-us/library/system.windows.forms.form.keypreview.aspx . Hope you can figure out the rest.

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