Files
kte/InputHandler.h
Kyle Isom e4cd4877cc Introduce file picker and GUI configuration with enhancements.
- Add visual file picker for GUI with toggle support.
- Introduce `GUIConfig` class for loading GUI settings from configuration file.
- Refactor window initialization to support dynamic sizing based on configuration.
- Add macOS-specific handling for fullscreen behavior.
- Improve header inclusion order and minor code cleanup.
2025-11-30 18:35:12 -08:00

30 lines
731 B
C++

/*
* InputHandler.h - input abstraction and mapping to commands
*/
#ifndef KTE_INPUT_HANDLER_H
#define KTE_INPUT_HANDLER_H
#include <string>
#include "Command.h"
// Result of translating raw input into an editor command.
struct MappedInput {
bool hasCommand = false;
CommandId id = CommandId::Refresh;
std::string arg; // optional argument (e.g., text for InsertText)
int count = 0; // optional repeat (C-u not yet implemented)
};
class InputHandler {
public:
virtual ~InputHandler() = default;
// Poll for input and translate it to a command. Non-blocking.
// Returns true if a command is available in 'out'. Returns false if no input.
virtual bool Poll(MappedInput &out) = 0;
};
#endif // KTE_INPUT_HANDLER_H