diff -r f40bd358129a tools/ioemu/Makefile.target --- a/tools/ioemu/Makefile.target Sat Mar 17 16:56:39 2007 +0000 +++ b/tools/ioemu/Makefile.target Mon Mar 19 14:13:35 2007 -0400 @@ -193,6 +193,10 @@ LIBS+=-lsocket -lnsl -lresolv LIBS+=-lsocket -lnsl -lresolv endif +ifeq ($(debug),y) +CFLAGS += -DQEMU_VNC_MONITOR_EXPORT +endif + # profiling code ifdef TARGET_GPROF LDFLAGS+=-p diff -r f40bd358129a tools/ioemu/vnc.c --- a/tools/ioemu/vnc.c Sat Mar 17 16:56:39 2007 +0000 +++ b/tools/ioemu/vnc.c Mon Mar 19 14:54:19 2007 -0400 @@ -113,8 +113,10 @@ struct VncState int visible_w; int visible_h; +#ifdef QEMU_VNC_MONITOR_EXPORT int ctl_keys; /* Ctrl+Alt starts calibration */ int shift_keys; /* Shift / CapsLock keys */ +#endif int numlock; }; @@ -895,6 +897,7 @@ static void do_key_event(VncState *vs, i kbd_put_keycode(keycode & 0x7f); else kbd_put_keycode(keycode | 0x80); +#ifdef QEMU_VNC_MONITOR_EXPORT } else if (down) { int qemu_keysym = 0; @@ -922,8 +925,10 @@ static void do_key_event(VncState *vs, i } if (qemu_keysym != 0) kbd_put_keysym(qemu_keysym); - } - +#endif + } + +#ifdef QEMU_VNC_MONITOR_EXPORT if (down) { switch (sym) { case XK_Control_L: @@ -976,6 +981,10 @@ static void do_key_event(VncState *vs, i break; } } +#else + if (!down && sym == XK_Num_Lock) + vs->numlock = !vs->numlock; +#endif } static void key_event(VncState *vs, int down, uint32_t sym)