Line 75... |
Line 75... |
void ConsoleWidget::handleResponse(AttributeType *req, AttributeType *resp) {
|
void ConsoleWidget::handleResponse(AttributeType *req, AttributeType *resp) {
|
if (resp->is_nil() || resp->is_invalid()) {
|
if (resp->is_nil() || resp->is_invalid()) {
|
return;
|
return;
|
}
|
}
|
RISCV_mutex_lock(&mutexOutput_);
|
RISCV_mutex_lock(&mutexOutput_);
|
strOutput_ += QString(resp->to_config()) + "\n";
|
strOutput_ += QString(resp->to_config().to_string()) + "\n";
|
RISCV_mutex_unlock(&mutexOutput_);
|
RISCV_mutex_unlock(&mutexOutput_);
|
emit signalNewData();
|
emit signalNewData();
|
}
|
}
|
|
|
void ConsoleWidget::keyPressEvent(QKeyEvent *e) {
|
void ConsoleWidget::keyPressEvent(QKeyEvent *e) {
|
Line 89... |
Line 89... |
char vt_char = static_cast<char>(vt_key);
|
char vt_char = static_cast<char>(vt_key);
|
if (vt_char >= 'A' && vt_char <= 'Z' && e->modifiers() == Qt::NoModifier) {
|
if (vt_char >= 'A' && vt_char <= 'Z' && e->modifiers() == Qt::NoModifier) {
|
vt_key -= static_cast<uint32_t>('A');
|
vt_key -= static_cast<uint32_t>('A');
|
vt_key += static_cast<uint32_t>('a');
|
vt_key += static_cast<uint32_t>('a');
|
}
|
}
|
|
uint8_t spsmb = static_cast<uint8_t>(e->text().at(0).toLatin1());
|
|
if (spsmb == '_' || vt_key == ':' || vt_key == '\\' || vt_key == '/') {
|
|
vt_key = spsmb;
|
|
}
|
//printf("vt_key = %08x\n", vt_key);
|
//printf("vt_key = %08x\n", vt_key);
|
bool cmd_ready = iauto_->processKey(vt_key, &cmd, &cursorPos_);
|
bool cmd_ready = iauto_->processKey(vt_key, &cmd, &cursorPos_);
|
|
|
moveCursor(QTextCursor::End);
|
moveCursor(QTextCursor::End);
|
cursor = textCursor();
|
cursor = textCursor();
|