diff --git a/demo/Directory.Build.props b/demo/Directory.Build.props
index c950d6a..3a82054 100644
--- a/demo/Directory.Build.props
+++ b/demo/Directory.Build.props
@@ -1,6 +1,6 @@
enable
- 11.0.9
+ 11.0.10
diff --git a/demo/Ursa.Demo/Pages/NumPadDemo.axaml b/demo/Ursa.Demo/Pages/NumPadDemo.axaml
index b593e7b..dbd997a 100644
--- a/demo/Ursa.Demo/Pages/NumPadDemo.axaml
+++ b/demo/Ursa.Demo/Pages/NumPadDemo.axaml
@@ -1,15 +1,36 @@
-
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Ursa.Themes.Semi/Controls/NumPad.axaml b/src/Ursa.Themes.Semi/Controls/NumPad.axaml
index c5339e4..853d45d 100644
--- a/src/Ursa.Themes.Semi/Controls/NumPad.axaml
+++ b/src/Ursa.Themes.Semi/Controls/NumPad.axaml
@@ -3,34 +3,37 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:u="https://irihi.tech/ursa">
+
+
+
-
-
+
@@ -44,14 +47,122 @@
Grid.Column="1"
FunctionContent="/"
NumContent="/"
- NumKey="OemQuestion" />
+ NumKey="Divide" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -62,10 +173,13 @@
-
+
-
+
diff --git a/src/Ursa/Controls/NumPad/NumPad.cs b/src/Ursa/Controls/NumPad/NumPad.cs
index ae8d8da..783eda9 100644
--- a/src/Ursa/Controls/NumPad/NumPad.cs
+++ b/src/Ursa/Controls/NumPad/NumPad.cs
@@ -76,14 +76,30 @@ public class NumPad: TemplatedControl
[Key.NumPad7] = "7",
[Key.NumPad8] = "8",
[Key.NumPad9] = "9",
- [Key.OemPlus] = "+",
- [Key.OemMinus] = "-",
+ [Key.Add] = "+",
+ [Key.Subtract] = "-",
+ [Key.Multiply] = "*",
+ [Key.Divide] = "/",
+ [Key.Decimal] = ".",
};
public void ProcessClick(object o)
{
+ if (Target?.IsFocused != true)
+ {
+ return;
+ }
if (o is NumPadButton b)
{
+ if (b.NumKey is null)
+ {
+ Target?.RaiseEvent(new KeyEventArgs()
+ {
+ Source = this,
+ RoutedEvent = KeyDownEvent,
+ Key = b.FunctionKey ?? Key.None,
+ });
+ }
if (b is { NumMode: true, NumKey: not null })
{
Target?.RaiseEvent(new TextInputEventArgs()