]> Joshua Wise's Git repositories - netwatch.git/blobdiff - net/rfb.c
a little more detail in rfb key logging
[netwatch.git] / net / rfb.c
index 1f620f0dcec9d8354f7a049f31a7044eac857472..5735db12c9863271f55b2f72efe99b65e6a5ac7a 100644 (file)
--- a/net/rfb.c
+++ b/net/rfb.c
@@ -3,6 +3,8 @@
 #include <output.h>
 #include <fb.h>
 
+#include "../aseg-paging/keyboard.h"
+
 #include "lwip/tcp.h"
 
 #include "rfb.h"
@@ -358,9 +360,11 @@ static enum fsm_result recv_fsm(struct tcp_pcb *pcb, struct rfb_state *state) {
                case KEY_EVENT:
                        if (state->writepos < sizeof(struct key_event_pkt))
                                return NEEDMORE;
-                       outputf("RFB: Key");
 
-                       /* XXX stub */
+                       struct key_event_pkt * p = (struct key_event_pkt *)state->data;
+
+                       outputf("RFB: Key: %d (%c)", htonl(p->keysym), (htonl(p->keysym) & 0xFF));
+                       kbd_inject_keysym(htonl(p->keysym), p->downflag);
 
                        state->readpos += sizeof(struct key_event_pkt);
                        return OK;
This page took 0.023684 seconds and 4 git commands to generate.