Browse Source

Hide debug info. Use constant in expr instead of variable.

Margers 1 month ago
parent
commit
49a46d107c
1 changed files with 4 additions and 4 deletions
  1. 4 4
      packages/rtl-console/src/unix/keyboard.pp

+ 4 - 4
packages/rtl-console/src/unix/keyboard.pp

@@ -782,8 +782,8 @@ const
     PutMouseEvent(MouseEvent);
     PutMouseEvent(MouseEvent);
     if (ButtonMask and (MouseButton4 or MouseButton5)) <> 0 then
     if (ButtonMask and (MouseButton4 or MouseButton5)) <> 0 then
     begin
     begin
-      MouseEvent.Action:=MouseActionUp; {to trick LastMouseEvent pretend that we have MouseActionUp event }
-      MouseEvent.Buttons:=LastMouseEvent.Buttons and not ButtonMask;
+      MouseEvent.Action:=MouseActionUp; {to trick LastMouseEvent that we have MouseActionUp event }
+      MouseEvent.Buttons:=LastMouseEvent.Buttons and not (MouseButton4 or MouseButton5);
       {PutMouseEvent(MouseEvent); do not put actual event }
       {PutMouseEvent(MouseEvent); do not put actual event }
     end;
     end;
     LastMouseEvent:=MouseEvent;
     LastMouseEvent:=MouseEvent;
@@ -878,14 +878,14 @@ begin
       { maybe we should claim }
       { maybe we should claim }
       with CurPTree^ do
       with CurPTree^ do
         begin
         begin
-{$ifdef DEBUG}
+{$ifdef DEBUG1}
           if (ScanValue<>AScan) or (CharValue<>AChar) then
           if (ScanValue<>AScan) or (CharValue<>AChar) then
             Writeln(system.stderr,'key "',st,'" changed value');
             Writeln(system.stderr,'key "',st,'" changed value');
           if (ScanValue<>AScan) then
           if (ScanValue<>AScan) then
             Writeln(system.stderr,'Scan was ',ScanValue,' now ',AScan);
             Writeln(system.stderr,'Scan was ',ScanValue,' now ',AScan);
           if (CharValue<>AChar) then
           if (CharValue<>AChar) then
             Writeln(system.stderr,'AnsiChar was ',chr(CharValue),' now ',chr(AChar));
             Writeln(system.stderr,'AnsiChar was ',chr(CharValue),' now ',chr(AChar));
-{$endif DEBUG}
+{$endif DEBUG1}
           ScanValue:=AScan;
           ScanValue:=AScan;
           CharValue:=AChar;
           CharValue:=AChar;
           ShiftValue:=AShift;
           ShiftValue:=AShift;