Use "ANSI-mode" cursor keys only on actual cursor keys (A through D).

Fixes #161.
This commit is contained in:
Keith Winstein
2012-04-16 03:44:07 -04:00
parent cca925e020
commit c15d3d0c48
2 changed files with 49 additions and 16 deletions
+10 -3
View File
@@ -24,18 +24,25 @@
namespace Terminal {
class UserInput {
public:
enum UserInputState {
Ground,
ESC,
SS3
};
private:
wchar_t last_byte;
UserInputState state;
public:
UserInput()
: last_byte( -1 )
: state( Ground )
{}
std::string input( const Parser::UserByte *act,
bool application_mode_cursor_keys );
bool operator==( const UserInput &x ) const { return last_byte == x.last_byte; }
bool operator==( const UserInput &x ) const { return state == x.state; }
};
}