How to determine plus key in wpf?

I know that I can use the code below to define the Enter key on the keyboard

if (e.Key == Key.Return) { // do something } 

But I want to know what is the code for "+" and "-"?

Can anybody help me.

+7
c # wpf keyboard
source share
2 answers

There are two sets. One on the keyboard and the other on the keyboard side.

To use keboard Key.OemPlus and Key.OemMinus , and for keyboard use Key.Add and Key.Subtract .

+14
source share

The entire list of keys is here: http://msdn.microsoft.com/en-us/library/system.windows.input.key.aspx

OemPlus and OemMinus are correct, as Nikil said.

+3
source share

All Articles