mirror of
https://github.com/clangen/musikcube.git
synced 2025-03-29 19:20:28 +00:00
Couple small tweaks to make things a bit smoother going in Linux
This commit is contained in:
parent
26d34a596c
commit
301985a335
@ -176,8 +176,7 @@ static inline std::string readKeyPress(int64 ch) {
|
||||
kn += (char)getch();
|
||||
}
|
||||
|
||||
|
||||
//std::cerr << "keyname: " << kn << std::endl;
|
||||
// std::cerr << "keyname: " << kn << std::endl;
|
||||
// std::cerr << "ch: " << ch << std::endl;
|
||||
|
||||
return kn;
|
||||
@ -293,10 +292,10 @@ int main(int argc, char* argv[])
|
||||
else if (kn == "KEY_RESIZE") {
|
||||
resizeAt = now() + REDRAW_DEBOUNCE_MS;
|
||||
}
|
||||
else if (ch == KEY_F(1)) {
|
||||
else if (ch == KEY_F(1) || kn == "M-q") {
|
||||
changeLayout(state, consoleLayout);
|
||||
}
|
||||
else if (ch == KEY_F(2)) {
|
||||
else if (ch == KEY_F(2) || kn == "M-w") {
|
||||
changeLayout(state, libraryLayout);
|
||||
}
|
||||
else if (!globalHotkeys.Handle(kn)) {
|
||||
|
@ -81,7 +81,7 @@ void removeUtf8Char(std::string& value) {
|
||||
}
|
||||
|
||||
void CommandWindow::Write(const std::string& key) {
|
||||
if (key == "^H" || key == "^?") { /* backspace */
|
||||
if (key == "^H" || key == "^?" || key == "KEY_BACKSPACE") { /* backspace */
|
||||
removeUtf8Char(this->buffer);
|
||||
}
|
||||
else if (key == "^M") { /* return */
|
||||
|
Loading…
x
Reference in New Issue
Block a user