Files
kte/TerminalInputHandler.h
Kyle Isom f3bdced3d4 Add visual-line mode support with tests and UI integration.
- Introduced visual-line mode for multi-line selection and edits.
- Implemented commands, rendering, and keyboard shortcuts.
- Added tests for broadcast operations in visual-line mode.
2026-02-10 22:07:13 -08:00

37 lines
805 B
C++

/*
* TerminalInputHandler - ncurses-based input handling for terminal mode
*/
#pragma once
#include "InputHandler.h"
class TerminalInputHandler final : public InputHandler {
public:
TerminalInputHandler();
~TerminalInputHandler() override;
void Attach(Editor *ed) override
{
ed_ = ed;
}
bool Poll(MappedInput &out) override;
private:
bool decode_(MappedInput &out);
// ke-style prefix state
bool k_prefix_ = false; // true after C-k until next key or ESC
// Optional control qualifier inside k-prefix (e.g., user typed literal 'C' or '^')
bool k_ctrl_pending_ = false;
// Simple meta (ESC) state for ESC sequences like ESC b/f
bool esc_meta_ = false;
// Mouse drag selection state
bool mouse_selecting_ = false;
Editor *ed_ = nullptr; // attached editor for uarg handling
};