// The keycode is in c.buf[1], but as keymaps aren't implemented yet, we'll use the // space character as a placeholder. keysym := int(' '); // TODO(nigeltao): Should we send KeyboardChan ints for Shift/Ctrl/Alt? Should Shift-A send // the same int down the channel as the sent on just the A key? // TODO(nigeltao): How should IME events (e.g. key presses that should generate CJK text) work? Or // is that outside the scope of the draw.Context interface? if c.buf[0] == 0x03 { keysym = -keysym } c.kbd <- keysym;