From d5cba7a574a667f5321194cb05d0b4adcb995866 Mon Sep 17 00:00:00 2001 From: runge Date: Sun, 7 Sep 2008 04:17:33 +0000 Subject: x11vnc: kill gui_pid on exit in -connect/-connect_or_exit mode. -grablocal n experiment (not compiled by default). -macuskbd option for macosx for orig uskdb code. keycode=N remote contol cmd. Find dpy look at non-NFS cookies in /tmp. Fix gui tray insertion on recent gnome dt. Fix connect_file bug. Sync SSVNC --- x11vnc/macosxCG.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'x11vnc/macosxCG.c') diff --git a/x11vnc/macosxCG.c b/x11vnc/macosxCG.c index bd11f6a..673a39a 100644 --- a/x11vnc/macosxCG.c +++ b/x11vnc/macosxCG.c @@ -31,6 +31,7 @@ int macosxCG_get_cursor_pos(int *x, int *y); int macosxCG_get_cursor(void); void macosxCG_init_key_table(void); void macosxCG_key_inject(int down, unsigned int keysym); +void macosxCG_keycode_inject(int down, int keycode); CGDirectDisplayID displayID = 0; @@ -595,6 +596,14 @@ void macosxCG_init_key_table(void) { } extern void init_key_table(void); +extern int macosx_us_kbd; + +void macosxCG_keycode_inject(int down, int keycode) { + CGKeyCode keyCode = (CGKeyCode) keycode; + CGCharCode keyChar = 0; + + CGPostKeyboardEvent(keyChar, keyCode, down); +} void macosxCG_key_inject(int down, unsigned int keysym) { CGKeyCode keyCode = keyTable[(unsigned short)keysym]; @@ -606,7 +615,7 @@ void macosxCG_key_inject(int down, unsigned int keysym) { init_key_table(); - if (keysym < 0xFF) { + if (keysym < 0xFF && macosx_us_kbd) { keyChar = (CGCharCode) keysym; } if (keyCode == 0xFFFF) { -- cgit v1.2.1