linux
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
#include "pikbdlistener.h"
|
||||
|
||||
#include "piincludes_p.h"
|
||||
#include "piliterals.h"
|
||||
#ifndef WINDOWS
|
||||
# include <termios.h>
|
||||
#else
|
||||
@@ -147,7 +148,7 @@ PRIVATE_DEFINITION_END(PIKbdListener)
|
||||
|
||||
|
||||
PIKbdListener::PIKbdListener(KBFunc slot, void * _d, bool startNow): PIThread() {
|
||||
setName("keyboard_listener");
|
||||
setName("keyboard_listener"_a);
|
||||
_object = this;
|
||||
#ifdef WINDOWS
|
||||
PRIVATE->hIn = GetStdHandle(STD_INPUT_HANDLE);
|
||||
@@ -526,7 +527,7 @@ void PIKbdListener::readKeyboard() {
|
||||
cout << "'" << (char)(rc[i]) << "' ";
|
||||
cout << endl;*/
|
||||
}
|
||||
if (ke.key == 0 && PRIVATE->ret > 1) ke.key = PIChar(rc).unicode16Code();
|
||||
if (ke.key == 0 && PRIVATE->ret > 1) ke.key = PIChar::fromSystem(rc).unicode16Code();
|
||||
#endif
|
||||
if ((rc[0] == '\n' || rc[0] == '\r') && PRIVATE->ret == 1) ke.key = Return;
|
||||
if (exit_enabled && ke.key == exit_key) {
|
||||
|
||||
Reference in New Issue
Block a user