* * *

Author Topic: Cannot get mouse working in linux console  (Read 1429 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

  • Jr. Member
  • **
  • Posts: 56
  • 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

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus