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