Recent

Author Topic: Cannot get mouse working in linux console  (Read 5210 times)

jalphonse

  • New Member
  • *
  • Posts: 10
Cannot get mouse working in linux console
« on: January 14, 2015, 10:26:55 am »
Hi,
I try to program the mouse in a linux console (xterm). Even with the very simple example given in the mouse unit reference, I cannot get it working. When I run the example, it only prints ANSI escape code on the console each time I press a mouse button.

Here is the code used:
Program Example2;
Uses mouse;
begin
  InitMouse;
  Writeln('Press right mouse button to exit program');
  While (GetMouseButtons<>MouseRightButton) do ;
  DoneMouse;
end.

Thank you for your help.

Kays

  • Hero Member
  • *****
  • Posts: 569
  • Whasup!?
    • KaiBurghardt.de
Re: Cannot get mouse working in linux console
« Reply #1 on: March 19, 2017, 11:51:38 pm »
I try to program the mouse in a linux console (xterm).
The Linux console or the Linux terminal is the tty which you usually access via pressing e.g. [Ctrl] + [Alt] + [F1].

When I run the example, it only prints ANSI escape code on the console each time I press a mouse button. […]
This corresponds to the documented behavior:
Quote from: Reference for unit 'Mouse'
No support for graphical screens is implemented, and there are (currently) no plans to implement this.
Starting your application on the Linux terminal (not under X11 or Wayland) [while gpm is running] results in the expected behavior.
Yours Sincerely
Kai Burghardt

 

TinyPortal © 2005-2018