forked from qt-creator/qt-creator
Terminal: Fix \ on German mac keyboard
Change-Id: I87d4299c1e41f4a553b5ecc9690b2fd332b7b3e8 Reviewed-by: Burak Hancerli <burak.hancerli@qt.io> Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
@@ -681,6 +681,12 @@ void TerminalWidget::keyPressEvent(QKeyEvent *event)
|
|||||||
// ctrl modifier. This helps with ncurses applications which otherwise
|
// ctrl modifier. This helps with ncurses applications which otherwise
|
||||||
// do not recognize ctrl+<key> and in the shell for getting common control characters
|
// do not recognize ctrl+<key> and in the shell for getting common control characters
|
||||||
// like ctrl+i for tab or ctrl+j for newline.
|
// like ctrl+i for tab or ctrl+j for newline.
|
||||||
|
|
||||||
|
// Workaround for "ALT+SHIFT+/" (\ on german mac keyboards)
|
||||||
|
if (mod == (VTERM_MOD_SHIFT | VTERM_MOD_ALT) && event->key() == Qt::Key_Slash) {
|
||||||
|
mod = VTERM_MOD_NONE;
|
||||||
|
}
|
||||||
|
|
||||||
vterm_keyboard_unichar(m_vterm.get(),
|
vterm_keyboard_unichar(m_vterm.get(),
|
||||||
event->text().toUcs4()[0],
|
event->text().toUcs4()[0],
|
||||||
static_cast<VTermModifier>(mod & ~VTERM_MOD_CTRL));
|
static_cast<VTermModifier>(mod & ~VTERM_MOD_CTRL));
|
||||||
|
|||||||
Reference in New Issue
Block a user