summaryrefslogtreecommitdiffstats
path: root/x11vnc/macosxCG.c
diff options
context:
space:
mode:
authorrunge <runge>2008-09-07 04:17:33 +0000
committerrunge <runge>2008-09-07 04:17:33 +0000
commitd5cba7a574a667f5321194cb05d0b4adcb995866 (patch)
tree2748fd38612cc63256ee864284cd8dab19f4eba1 /x11vnc/macosxCG.c
parentdbfa4ad1f78f6133bc5f50e766f7f3bfdb8fa049 (diff)
downloadlibtdevnc-d5cba7a574a667f5321194cb05d0b4adcb995866.tar.gz
libtdevnc-d5cba7a574a667f5321194cb05d0b4adcb995866.zip
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
Diffstat (limited to 'x11vnc/macosxCG.c')
-rw-r--r--x11vnc/macosxCG.c11
1 files changed, 10 insertions, 1 deletions
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) {