|
@@ -50,7 +50,7 @@ var extendedKeys map[string]Extended = map[string]Extended{
|
|
|
"[21~": F10, // terminal
|
|
|
"[23~": F11,
|
|
|
"[24~": F12, // terminal
|
|
|
- "OP": F1, // where did I find these O-codes? (from xterm)
|
|
|
+ "OP": F1, // where did I find these O-codes? (from xterm)
|
|
|
"OQ": F2,
|
|
|
"OR": F3,
|
|
|
"OS": F4, // syncterm "[1" = F1,F2,F3, and F4)
|
|
@@ -274,12 +274,10 @@ func process(d *Door, newRune bool) {
|
|
|
d.readerChannel <- ReaderData{0, F9, nil}
|
|
|
case 0x44:
|
|
|
d.readerChannel <- ReaderData{0, F10, nil}
|
|
|
-
|
|
|
case 0x45:
|
|
|
d.readerChannel <- ReaderData{0, F11, nil}
|
|
|
case 0x46:
|
|
|
d.readerChannel <- ReaderData{0, F12, nil}
|
|
|
-
|
|
|
case 0x52:
|
|
|
d.readerChannel <- ReaderData{0, INSERT, nil}
|
|
|
case 0x53:
|
|
@@ -287,7 +285,6 @@ func process(d *Door, newRune bool) {
|
|
|
default:
|
|
|
log.Printf("ERROR Doorway mode: 0x00 %x\n", r2)
|
|
|
d.readerChannel <- ReaderData{0, UNKNOWN, nil}
|
|
|
-
|
|
|
}
|
|
|
} else {
|
|
|
return
|
|
@@ -330,7 +327,7 @@ func process(d *Door, newRune bool) {
|
|
|
}
|
|
|
*/
|
|
|
|
|
|
- // \x1b[ codes end with @-~ 0x40-0x7e
|
|
|
+ // \x1b[ codes end with @-~ 0x40-0x7e
|
|
|
|
|
|
var extended []rune = make([]rune, 0, 10)
|
|
|
extended = append(extended, r2)
|
|
@@ -471,6 +468,9 @@ func (d *Door) WaitKey(timeout time.Duration) (rune, Extended, error) {
|
|
|
d.readerMutex.Unlock()
|
|
|
*/
|
|
|
|
|
|
+ if WantGetMouse {
|
|
|
+ d.GetMouse()
|
|
|
+ }
|
|
|
// Probably faster to just read from closed channel and get ok = false.
|
|
|
|
|
|
select {
|
|
@@ -480,6 +480,9 @@ func (d *Door) WaitKey(timeout time.Duration) (rune, Extended, error) {
|
|
|
log.Println("WaitKey:", r)
|
|
|
}
|
|
|
// return bio.GetKey()
|
|
|
+ if r.Ex == MOUSE {
|
|
|
+ WantGetMouse = true
|
|
|
+ }
|
|
|
return r.R, r.Ex, r.Err
|
|
|
} else {
|
|
|
log.Println("WaitKey: Disconnected")
|