mirror of
https://github.com/rizinorg/cutter.git
synced 2025-01-18 18:38:51 +00:00
Fix shortcuts #237
This commit is contained in:
parent
bb26c2b7a5
commit
90915134f5
@ -71,6 +71,12 @@ DisassemblerGraphView::DisassemblerGraphView(QWidget *parent)
|
||||
QShortcut *shortcut_prev_instr = new QShortcut(QKeySequence(Qt::Key_K), this);
|
||||
shortcut_prev_instr->setContext(Qt::WidgetShortcut);
|
||||
connect(shortcut_prev_instr, SIGNAL(activated()), this, SLOT(prevInstr()));
|
||||
QShortcut *shortcut_next_instr_arrow = new QShortcut(QKeySequence::MoveToNextLine, this);
|
||||
shortcut_next_instr_arrow->setContext(Qt::WidgetShortcut);
|
||||
connect(shortcut_next_instr_arrow, SIGNAL(activated()), this, SLOT(nextInstr()));
|
||||
QShortcut *shortcut_prev_instr_arrow = new QShortcut(QKeySequence::MoveToPreviousLine, this);
|
||||
shortcut_prev_instr_arrow->setContext(Qt::WidgetShortcut);
|
||||
connect(shortcut_prev_instr_arrow, SIGNAL(activated()), this, SLOT(prevInstr()));
|
||||
shortcuts.append(shortcut_disassembly);
|
||||
shortcuts.append(shortcut_escape);
|
||||
shortcuts.append(shortcut_zoom_in);
|
||||
@ -78,7 +84,8 @@ DisassemblerGraphView::DisassemblerGraphView(QWidget *parent)
|
||||
shortcuts.append(shortcut_zoom_reset);
|
||||
shortcuts.append(shortcut_next_instr);
|
||||
shortcuts.append(shortcut_prev_instr);
|
||||
|
||||
shortcuts.append(shortcut_next_instr_arrow);
|
||||
shortcuts.append(shortcut_prev_instr_arrow);
|
||||
|
||||
initFont();
|
||||
colorsUpdatedSlot();
|
||||
|
@ -148,7 +148,9 @@ DisassemblyWidget::DisassemblyWidget(QWidget *parent)
|
||||
s->setContext(Qt::WidgetShortcut); \
|
||||
connect(s, &QShortcut::activated, this, (slot)); \
|
||||
}
|
||||
ADD_SHORTCUT(QKeySequence(Qt::Key_J), [this]() { moveCursorRelative(false, false); })
|
||||
ADD_SHORTCUT(QKeySequence::MoveToNextLine, [this]() { moveCursorRelative(false, false); })
|
||||
ADD_SHORTCUT(QKeySequence(Qt::Key_K), [this]() { moveCursorRelative(true, false); })
|
||||
ADD_SHORTCUT(QKeySequence::MoveToPreviousLine, [this]() { moveCursorRelative(true, false); })
|
||||
ADD_SHORTCUT(QKeySequence::MoveToNextPage, [this]() { moveCursorRelative(false, true); })
|
||||
ADD_SHORTCUT(QKeySequence::MoveToPreviousPage, [this]() { moveCursorRelative(true, true); })
|
||||
|
Loading…
Reference in New Issue
Block a user