In console enable mouse buttons browse back/forward (xterm Unix)

This commit is contained in:
Margers 2024-10-04 09:36:10 +00:00 committed by Michael Van Canneyt
parent bda49f7219
commit 8fd249807e

View File

@ -737,16 +737,7 @@ const
exit;
if (Y<(Low(MouseEvent.Y)+1)) or (Y>(High(MouseEvent.Y)+1)) then
exit;
MouseEvent.X:=X-1;
MouseEvent.Y:=Y-1;
if (buttonval and 32)<>0 then
begin
MouseEvent.Action:=MouseActionMove;
MouseEvent.Buttons:=LastMouseEvent.Buttons;
end
else
begin
case buttonval and 67 of
case buttonval and (67 or 128) of
0 : {left button press}
ButtonMask:=1;
1 : {middle button pressed }
@ -759,7 +750,20 @@ const
ButtonMask:=8;
65: { button 5 pressed }
ButtonMask:=16;
128: { button browse back }
ButtonMask:=MouseXButton1;
129: { button browse forward }
ButtonMask:=MouseXButton2;
end;
MouseEvent.X:=X-1;
MouseEvent.Y:=Y-1;
if (buttonval and 32)<>0 then
begin
MouseEvent.Action:=MouseActionMove;
MouseEvent.Buttons:=LastMouseEvent.Buttons;
end
else
begin
if ch='M' then
begin
MouseEvent.Action:=MouseActionDown;