1/*
2 SPDX-FileCopyrightText: 2022 Volker Krause <vkrause@kde.org>
3 SPDX-License-Identifier: LGPL-2.0-or-later
4*/
5
6#include "keyevent.h"
7
8using namespace KateVi;
9
10QEvent::Type KeyEvent::type() const
11{
12 return m_type;
13}
14
15Qt::KeyboardModifiers KeyEvent::modifiers() const
16{
17 return m_modifiers;
18}
19
20int KeyEvent::key() const
21{
22 return m_key;
23}
24
25QString KeyEvent::text() const
26{
27 return m_text;
28}
29
30KeyEvent KeyEvent::fromQKeyEvent(const QKeyEvent &e)
31{
32 KeyEvent keyEvent;
33 keyEvent.m_type = e.type();
34 keyEvent.m_modifiers = e.modifiers();
35 keyEvent.m_key = e.key();
36 keyEvent.m_text = e.text();
37 return keyEvent;
38}
39

source code of ktexteditor/src/vimode/keyevent.cpp