Browse Source

TFresnelWSForm: NumKeyToInputType check Shift

mattias 5 months ago
parent
commit
d9197be091
1 changed files with 4 additions and 5 deletions
  1. 4 5
      src/base/fresnel.widgetset.pas

+ 4 - 5
src/base/fresnel.widgetset.pas

@@ -127,14 +127,13 @@ function TFresnelWSForm.NumKeyToInputType(aKey : Integer; aShift: TShiftState; o
 begin
   // Return true if we have a correct input type
   Result:=True;
+  aType:=fitInsertText;
+  if aKey<0 then
+    exit(false);
+  if aShift*[ssShift,ssCtrl,ssAlt]<>[] then exit;
   case aKey of
     TKeyCodes.BackSpace : aType:=fitDeleteContentBackward;
     TKeyCodes.Delete : aType:=fitDeleteContentForward;
-  else
-    if aKey<0 then
-      Result:=False
-    else
-      aType:=fitInsertText
   end;
 end;