9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] A couple questions about /dev/draw and /dev/kbmap
@ 2016-05-04 20:20 Dave MacFarlane
  2016-05-04 21:53 ` hiro
  2016-05-05  2:45 ` cinap_lenrek
  0 siblings, 2 replies; 8+ messages in thread
From: Dave MacFarlane @ 2016-05-04 20:20 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 1471 bytes --]

Hi 9fans,

I have most of a working prototype of a Go Shiny driver for Plan9, but
there's a couple issues that I'd like to resolve and cleanup that I'd like
to do.

First, reads and writes to /dev/draw/n/data seem to fail if it's larger
than 65536 bytes. At 4 bytes per pixel, that's not very much (that means
the image you can read is 128x128, and the biggest you can write slightly
smaller with the overhead of the header for the write..) As a hack, I'm
splitting up the calls for rectangles larger than that when reading or
writing ('r' and 'y' messages from draw(3)) into 1 read/write per row. But
65536 bytes still seems pretty artificially low? Is there any other way
around it? I'm not even sure if it's Go, Plan9, or drawterm that's adding
this restriction..

Second, I'd like to improve the keyboard handling. Right now I'm just
assuming that reading 'a' off /dev/cons came from the a key, 'A' came from
shift-A, etc. I'd like to load /dev/kbmap and make a more intelligent guess
of "the first key code which matches this utf8 rune in the kbmap" but man
kbmap is only partially helpful. It says that column 1 is "a table number"
and column 2 is "a hardware specific scan code". I think it's safe to
assume that table 0 is the unmodified key, but other than that does anyone
have any pointers for how to go from "table number" to "modifiers which
that table represents" and "hardware specific scan code" to "USB HID Key

- Dave

[-- Attachment #2: Type: text/html, Size: 1754 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-05-05 16:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-04 20:20 [9fans] A couple questions about /dev/draw and /dev/kbmap Dave MacFarlane
2016-05-04 21:53 ` hiro
2016-05-05  2:45 ` cinap_lenrek
2016-05-05 13:12   ` Dave MacFarlane
2016-05-05 13:16     ` Aram Hăvărneanu
2016-05-05 13:56     ` cinap_lenrek
2016-05-05 16:00       ` Charles Forsyth
2016-05-05 15:38     ` Skip Tavakkolian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).