mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2025-03-15 15:59:03 +01:00
Merge branch 'feature/KASM-2346_extend_mouse_buttons' into 'master'
Resolve KASM-2346 "Feature/ extend mouse buttons" Closes KASM-2346 See merge request kasm-technologies/internal/KasmVNC!72
This commit is contained in:
commit
0cf6654355
@ -225,7 +225,7 @@ void SMsgReader::readKeyEvent()
|
|||||||
|
|
||||||
void SMsgReader::readPointerEvent()
|
void SMsgReader::readPointerEvent()
|
||||||
{
|
{
|
||||||
int mask = is->readU8();
|
int mask = is->readU16();
|
||||||
int x = is->readU16();
|
int x = is->readU16();
|
||||||
int y = is->readU16();
|
int y = is->readU16();
|
||||||
int scrollX = is->readS16();
|
int scrollX = is->readS16();
|
||||||
|
@ -1634,13 +1634,15 @@ On a conventional mouse, buttons 1, 2 and 3 correspond to the left,
|
|||||||
middle and right buttons on the mouse. On a wheel mouse, each step of
|
middle and right buttons on the mouse. On a wheel mouse, each step of
|
||||||
the wheel is represented by a press and release of a certain button.
|
the wheel is represented by a press and release of a certain button.
|
||||||
Button 4 means up, button 5 means down, button 6 means left and
|
Button 4 means up, button 5 means down, button 6 means left and
|
||||||
button 7 means right.
|
button 7 means right. Some pointer devices support additional buttons.
|
||||||
|
Button 8 is typically the back button and button 9 is typically the
|
||||||
|
forward button.
|
||||||
|
|
||||||
=============== ==================== ========== =======================
|
=============== ==================== ========== =======================
|
||||||
No. of bytes Type [Value] Description
|
No. of bytes Type [Value] Description
|
||||||
=============== ==================== ========== =======================
|
=============== ==================== ========== =======================
|
||||||
1 ``U8`` 5 *message-type*
|
1 ``U8`` 5 *message-type*
|
||||||
1 ``U8`` *button-mask*
|
1 ``U16`` *button-mask*
|
||||||
2 ``U16`` *x-position*
|
2 ``U16`` *x-position*
|
||||||
2 ``U16`` *y-position*
|
2 ``U16`` *y-position*
|
||||||
=============== ==================== ========== =======================
|
=============== ==================== ========== =======================
|
||||||
|
2
kasmweb
2
kasmweb
@ -1 +1 @@
|
|||||||
Subproject commit cac1f25ce4a5b866ac57ed62b682e89f1ce0dc92
|
Subproject commit 26c97c1dd3b52f80af198fd05062ccd04d716f7d
|
@ -6,12 +6,12 @@
|
|||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This software is distributed in the hope that it will be useful,
|
* This software is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this software; if not, write to the Free Software
|
* along with this software; if not, write to the Free Software
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||||
@ -50,7 +50,7 @@ extern const unsigned int code_map_qnum_to_xorgevdev_len;
|
|||||||
extern const unsigned short code_map_qnum_to_xorgkbd[];
|
extern const unsigned short code_map_qnum_to_xorgkbd[];
|
||||||
extern const unsigned int code_map_qnum_to_xorgkbd_len;
|
extern const unsigned int code_map_qnum_to_xorgkbd_len;
|
||||||
|
|
||||||
#define BUTTONS 7
|
#define BUTTONS 10
|
||||||
|
|
||||||
/* Event queue is shared between all devices. */
|
/* Event queue is shared between all devices. */
|
||||||
#if XORG < 111
|
#if XORG < 111
|
||||||
@ -337,8 +337,8 @@ static int vncPointerProc(DeviceIntPtr pDevice, int onoff)
|
|||||||
InitValuatorAxisStruct(pDevice, 2, axes_labels[2], NO_AXIS_LIMITS, NO_AXIS_LIMITS, 0, 0, 0, Relative);
|
InitValuatorAxisStruct(pDevice, 2, axes_labels[2], NO_AXIS_LIMITS, NO_AXIS_LIMITS, 0, 0, 0, Relative);
|
||||||
InitValuatorAxisStruct(pDevice, 3, axes_labels[3], NO_AXIS_LIMITS, NO_AXIS_LIMITS, 0, 0, 0, Relative);
|
InitValuatorAxisStruct(pDevice, 3, axes_labels[3], NO_AXIS_LIMITS, NO_AXIS_LIMITS, 0, 0, 0, Relative);
|
||||||
|
|
||||||
char* envScrollFactorH = getenv("SCROLL_FACTOR_H");
|
char* envScrollFactorH = getenv("SCROLL_FACTOR_H");
|
||||||
char* envScrollFactorV = getenv("SCROLL_FACTOR_V");
|
char* envScrollFactorV = getenv("SCROLL_FACTOR_V");
|
||||||
|
|
||||||
float scrollFactorH = envScrollFactorH ? atof(envScrollFactorH) : 50.0;
|
float scrollFactorH = envScrollFactorH ? atof(envScrollFactorH) : 50.0;
|
||||||
float scrollFactorV = envScrollFactorV ? atof(envScrollFactorV) : 50.0;
|
float scrollFactorV = envScrollFactorV ? atof(envScrollFactorV) : 50.0;
|
||||||
@ -552,12 +552,12 @@ static void vncKeysymKeyboardEvent(KeySym keysym, int down)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Since we are checking the current state to determine if we need
|
* Since we are checking the current state to determine if we need
|
||||||
* to fake modifiers, we must make sure that everything put on the
|
* to fake modifiers, we must make sure that everything put on the
|
||||||
* input queue is processed before we start. Otherwise, shift may be
|
* input queue is processed before we start. Otherwise, shift may be
|
||||||
* stuck down.
|
* stuck down.
|
||||||
*/
|
*/
|
||||||
mieqProcessInputEvents();
|
mieqProcessInputEvents();
|
||||||
|
|
||||||
state = vncGetKeyboardState();
|
state = vncGetKeyboardState();
|
||||||
|
Loading…
Reference in New Issue
Block a user