Files
michaelschiemer/src/Framework/Console/Screen/MouseControlCode.php

29 lines
810 B
PHP

<?php
declare(strict_types=1);
namespace App\Framework\Console\Screen;
/**
* Mouse control codes for ANSI terminals (SGR mouse reports)
*/
enum MouseControlCode: string
{
// Enable/disable mouse reporting
case ENABLE_ALL = '?1000h'; // Enable mouse tracking
case DISABLE_ALL = '?1000l'; // Disable mouse tracking
case ENABLE_SGR = '?1006h'; // Enable SGR (Sixel Graphics Raster) mouse reports
case DISABLE_SGR = '?1006l'; // Disable SGR mouse reports
case ENABLE_MOVE = '?1003h'; // Enable mouse move tracking (for hover effects)
case DISABLE_MOVE = '?1003l'; // Disable mouse move tracking
/**
* Format the mouse control code as ANSI sequence
*/
public function format(): string
{
return "\033[{$this->value}";
}
}