forked from KolibriOS/kolibrios
mousecfg: use a hotkey to turn on mouse emulation
git-svn-id: svn://kolibrios.org@9261 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
f0928164bd
commit
1b84dbe19e
@ -1,4 +1,4 @@
|
|||||||
// Mouse Configuration Utility ver 1.62
|
// Mouse Configuration Utility ver 1.7
|
||||||
|
|
||||||
#define MEMSIZE 4096*11
|
#define MEMSIZE 4096*11
|
||||||
|
|
||||||
@ -17,9 +17,9 @@
|
|||||||
?define POINTER_SPEED "„¥«¨â¥«ì ᪮à®á⨠㪠§ â¥«ï ¬ëè¨"
|
?define POINTER_SPEED "„¥«¨â¥«ì ᪮à®á⨠㪠§ â¥«ï ¬ëè¨"
|
||||||
?define ACCELERATION_TEXT "—ã¢á⢨⥫ì®áâì 㪠§ â¥«ï ¬ëè¨"
|
?define ACCELERATION_TEXT "—ã¢á⢨⥫ì®áâì 㪠§ â¥«ï ¬ëè¨"
|
||||||
?define DOUBLE_CLICK_TEXT "‡ ¤¥à¦ª ¤¢®©®£® ª«¨ª ¬ëèìî"
|
?define DOUBLE_CLICK_TEXT "‡ ¤¥à¦ª ¤¢®©®£® ª«¨ª ¬ëèìî"
|
||||||
?define MOUSE_EMULATION "“¯à ¢«¥¨¥ 㪠§ ⥫¥¬ ¬ëè¨ ç¥à¥§ ª« ¢¨ âãàã"
|
?define MOUSE_EMULATION "“¯à ¢«¥¨¥ 㪠§ ⥫¥¬ ¬ëè¨ ç¥à¥§ ª« ¢¨ âãàã (F1)"
|
||||||
|
?define COMMOUSE "‡ £à㧨âì ¤à ©¢¥à ¬ëè¨ ¤«ï COM-¯®àâ (F2)"
|
||||||
?define MADMOUSE "‘ª¢®§ë¥ ¤«ï ªãàá®à áâ®à®ë íªà "
|
?define MADMOUSE "‘ª¢®§ë¥ ¤«ï ªãàá®à áâ®à®ë íªà "
|
||||||
?define COMMOUSE "‡ £à㧨âì ¤à ©¢¥à ¬ëè¨ ¤«ï COM-¯®àâ (F10)"
|
|
||||||
?define COMMOUSE_LOADED "'„à ©¢¥à ¤«ï COM ¬ëè¨ ¡ë« § £à㦥' -O"
|
?define COMMOUSE_LOADED "'„à ©¢¥à ¤«ï COM ¬ëè¨ ¡ë« § £à㦥' -O"
|
||||||
?define COMMOUSE_CAN_NOT_UNLOAD "'Žáâ ®¢ª ¤à ©¢¥à ¥¢®§¬®¦ ' -W"
|
?define COMMOUSE_CAN_NOT_UNLOAD "'Žáâ ®¢ª ¤à ©¢¥à ¥¢®§¬®¦ ' -W"
|
||||||
#else
|
#else
|
||||||
@ -29,9 +29,9 @@
|
|||||||
?define POINTER_SPEED "Mouse pointer speed divider"
|
?define POINTER_SPEED "Mouse pointer speed divider"
|
||||||
?define ACCELERATION_TEXT "Mouse pointer sensitivity"
|
?define ACCELERATION_TEXT "Mouse pointer sensitivity"
|
||||||
?define DOUBLE_CLICK_TEXT "Mouse double click delay"
|
?define DOUBLE_CLICK_TEXT "Mouse double click delay"
|
||||||
?define MOUSE_EMULATION "Enable mouse emulation using keyboard NumPad"
|
?define MOUSE_EMULATION "Enable mouse emulation using keyboard NumPad (F1)"
|
||||||
|
?define COMMOUSE "Load mouse driver for COM-port (F2)"
|
||||||
?define MADMOUSE "Through screen sides for pointer"
|
?define MADMOUSE "Through screen sides for pointer"
|
||||||
?define COMMOUSE "Load mouse driver for COM-port (F10)"
|
|
||||||
?define COMMOUSE_LOADED "'Driver for COM mouse loaded' -O"
|
?define COMMOUSE_LOADED "'Driver for COM mouse loaded' -O"
|
||||||
?define COMMOUSE_CAN_NOT_UNLOAD "'Driver stop is impossible' -W"
|
?define COMMOUSE_CAN_NOT_UNLOAD "'Driver stop is impossible' -W"
|
||||||
#endif
|
#endif
|
||||||
@ -75,9 +75,7 @@ void main() {
|
|||||||
else IF (acceleration.click(id)) ApplyCfg();
|
else IF (acceleration.click(id)) ApplyCfg();
|
||||||
else IF (double_click_delay.click(id)) ApplyCfg();
|
else IF (double_click_delay.click(id)) ApplyCfg();
|
||||||
else IF (emulation.click(id)) {
|
else IF (emulation.click(id)) {
|
||||||
IF (emulation.checked == true) RunProgram("/sys/mousemul", 0);
|
EventClickEmulation();
|
||||||
ELSE KillProcessByName("mousemul", SINGLE);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
else IF (madmouse.click(id)) {
|
else IF (madmouse.click(id)) {
|
||||||
IF (madmouse.checked == true) RunProgram("/sys/madmouse", 0);
|
IF (madmouse.checked == true) RunProgram("/sys/madmouse", 0);
|
||||||
@ -92,12 +90,16 @@ void main() {
|
|||||||
case evKey:
|
case evKey:
|
||||||
@GetKeyScancode();
|
@GetKeyScancode();
|
||||||
IF (AL == SCAN_CODE_ESC) ExitApp();
|
IF (AL == SCAN_CODE_ESC) ExitApp();
|
||||||
IF (AL == SCAN_CODE_F10) EventClickComMouse();
|
IF (AL == SCAN_CODE_F1) {
|
||||||
|
emulation.click(emulation.id);
|
||||||
|
EventClickEmulation();
|
||||||
|
}
|
||||||
|
IF (AL == SCAN_CODE_F2) EventClickComMouse();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case evReDraw:
|
case evReDraw:
|
||||||
sc.get();
|
sc.get();
|
||||||
DefineAndDrawWindow(430, 150, 424, 343+skin_height,0x34,sc.work,WINDOW_TITLE,0);
|
DefineAndDrawWindow(430, 150, 460, 343+skin_height,0x34,sc.work,WINDOW_TITLE,0);
|
||||||
GetProcessInfo(#Form, SelfInfo);
|
GetProcessInfo(#Form, SelfInfo);
|
||||||
if (Form.status_window&ROLLED_UP) break;
|
if (Form.status_window&ROLLED_UP) break;
|
||||||
mouse_frame.w = - FRAME_X * 2 + Form.cwidth;
|
mouse_frame.w = - FRAME_X * 2 + Form.cwidth;
|
||||||
@ -145,8 +147,8 @@ void DrawControls() {
|
|||||||
acceleration.draw(FRAME_X, y.inc(30));
|
acceleration.draw(FRAME_X, y.inc(30));
|
||||||
double_click_delay.draw(FRAME_X, y.inc(30));
|
double_click_delay.draw(FRAME_X, y.inc(30));
|
||||||
emulation.draw(FRAME_X, y.inc(33));
|
emulation.draw(FRAME_X, y.inc(33));
|
||||||
madmouse.draw(FRAME_X, y.inc(27));
|
|
||||||
com_mouse.draw(FRAME_X, y.inc(27));
|
com_mouse.draw(FRAME_X, y.inc(27));
|
||||||
|
madmouse.draw(FRAME_X, y.inc(27));
|
||||||
}
|
}
|
||||||
|
|
||||||
void LoadCfg() {
|
void LoadCfg() {
|
||||||
@ -187,4 +189,13 @@ void EventClickComMouse()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void EventClickEmulation()
|
||||||
|
{
|
||||||
|
IF (emulation.checked == true) {
|
||||||
|
RunProgram("/sys/mousemul", 0);
|
||||||
|
} ELSE {
|
||||||
|
KillProcessByName("mousemul", SINGLE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
stop:
|
stop:
|
||||||
|
Loading…
Reference in New Issue
Block a user