ports/net/kdeconnect-kde/patches/patch-plugins_mousepad_waylandremoteinput_cpp

101 lines
2.6 KiB
Text

Index: plugins/mousepad/waylandremoteinput.cpp
--- plugins/mousepad/waylandremoteinput.cpp.orig
+++ plugins/mousepad/waylandremoteinput.cpp
@@ -13,7 +13,9 @@
#include <KLocalizedString>
#include <QDBusPendingCallWatcher>
-#include <linux/input.h>
+//#include <linux/input.h>
+enum mouse_button { BTN_LEFT, BTN_RIGHT, BTN_MIDDLE, BTN_TOUCH };
+
#include <xkbcommon/xkbcommon.h>
namespace
@@ -21,38 +23,38 @@ namespace
// Translation table to keep in sync within all the implementations
int SpecialKeysMap[] = {
0, // Invalid
- KEY_BACKSPACE, // 1
- KEY_TAB, // 2
- KEY_LINEFEED, // 3
- KEY_LEFT, // 4
- KEY_UP, // 5
- KEY_RIGHT, // 6
- KEY_DOWN, // 7
- KEY_PAGEUP, // 8
- KEY_PAGEDOWN, // 9
- KEY_HOME, // 10
- KEY_END, // 11
- KEY_ENTER, // 12
- KEY_DELETE, // 13
- KEY_ESC, // 14
- KEY_SYSRQ, // 15
- KEY_SCROLLLOCK, // 16
- 0, // 17
- 0, // 18
- 0, // 19
- 0, // 20
- KEY_F1, // 21
- KEY_F2, // 22
- KEY_F3, // 23
- KEY_F4, // 24
- KEY_F5, // 25
- KEY_F6, // 26
- KEY_F7, // 27
- KEY_F8, // 28
- KEY_F9, // 29
- KEY_F10, // 30
- KEY_F11, // 31
- KEY_F12, // 32
+ //KEY_BACKSPACE, // 1
+ //KEY_TAB, // 2
+ //KEY_LINEFEED, // 3
+ //KEY_LEFT, // 4
+ //KEY_UP, // 5
+ //KEY_RIGHT, // 6
+ //KEY_DOWN, // 7
+ //KEY_PAGEUP, // 8
+ //KEY_PAGEDOWN, // 9
+ //KEY_HOME, // 10
+ //KEY_END, // 11
+ //KEY_ENTER, // 12
+ //KEY_DELETE, // 13
+ //KEY_ESC, // 14
+ //KEY_SYSRQ, // 15
+ //KEY_SCROLLLOCK, // 16
+ //0, // 17
+ //0, // 18
+ //0, // 19
+ //0, // 20
+ //KEY_F1, // 21
+ //KEY_F2, // 22
+ //KEY_F3, // 23
+ //KEY_F4, // 24
+ //KEY_F5, // 25
+ //KEY_F6, // 26
+ //KEY_F7, // 27
+ //KEY_F8, // 28
+ //KEY_F9, // 29
+ //KEY_F10, // 30
+ //KEY_F11, // 31
+ //KEY_F12, // 32
};
}
@@ -226,6 +228,7 @@ bool WaylandRemoteInput::handlePacket(const NetworkPac
bool shift = np.get<bool>(QStringLiteral("shift"), false);
bool super = np.get<bool>(QStringLiteral("super"), false);
+/*
if (ctrl)
s_session->iface->NotifyKeyboardKeycode(s_session->m_xdpPath, {}, KEY_LEFTCTRL, 1);
if (alt)
@@ -258,6 +261,7 @@ bool WaylandRemoteInput::handlePacket(const NetworkPac
s_session->iface->NotifyKeyboardKeycode(s_session->m_xdpPath, {}, KEY_LEFTSHIFT, 0);
if (super)
s_session->iface->NotifyKeyboardKeycode(s_session->m_xdpPath, {}, KEY_LEFTMETA, 0);
+*/
}
} else { // Is a mouse move event
s_session->iface->NotifyPointerMotion(s_session->m_xdpPath, {}, dx, dy);