9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] usb/kb: Home key produces "7"
@ 2013-03-01 11:20 yaroslav
  2013-03-01 14:09 ` erik quanstrom
  0 siblings, 1 reply; 6+ messages in thread
From: yaroslav @ 2013-03-01 11:20 UTC (permalink / raw)
  To: 9fans

The "Home" key produces rune "7" on certain USB keyboard. The fix is:

/n/sources/plan9/sys/src/cmd/usb/kb/kb.c:473,479 - /sys/src/cmd/usb/kb/kb.c:473,479
  }


- #define hasesc1(sc)	(((sc) > 0x47) || ((sc) == 0x38))
+ #define hasesc1(sc)	(((sc) >= 0x47) || ((sc) == 0x38))

  static void
  putmod(KDev *f, uchar mods, uchar omods, uchar mask, uchar esc, uchar sc)




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

* Re: [9fans] usb/kb: Home key produces "7"
  2013-03-01 11:20 [9fans] usb/kb: Home key produces "7" yaroslav
@ 2013-03-01 14:09 ` erik quanstrom
  2013-03-01 15:40   ` Yaroslav
  0 siblings, 1 reply; 6+ messages in thread
From: erik quanstrom @ 2013-03-01 14:09 UTC (permalink / raw)
  To: 9fans

On Fri Mar  1 06:21:01 EST 2013, yarikos@gmail.com wrote:
> The "Home" key produces rune "7" on certain USB keyboard. The fix is:
>
> /n/sources/plan9/sys/src/cmd/usb/kb/kb.c:473,479 - /sys/src/cmd/usb/kb/kb.c:473,479
>   }
>
>
> - #define hasesc1(sc)	(((sc) > 0x47) || ((sc) == 0x38))
> + #define hasesc1(sc)	(((sc) >= 0x47) || ((sc) == 0x38))
>
>   static void
>   putmod(KDev *f, uchar mods, uchar omods, uchar mask, uchar esc, uchar sc)

thanks.  that one had been bugging me.  looks like it works here.

- erik



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

* Re: [9fans] usb/kb: Home key produces "7"
  2013-03-01 14:09 ` erik quanstrom
@ 2013-03-01 15:40   ` Yaroslav
  2013-08-08 16:26     ` Yaroslav
  0 siblings, 1 reply; 6+ messages in thread
From: Yaroslav @ 2013-03-01 15:40 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

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

> thanks.  that one had been bugging me.  looks like it works here.
>

/n/sources/patch/usb-khome

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

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

* Re: [9fans] usb/kb: Home key produces "7"
  2013-03-01 15:40   ` Yaroslav
@ 2013-08-08 16:26     ` Yaroslav
  2014-04-04  9:26       ` Yaroslav
  0 siblings, 1 reply; 6+ messages in thread
From: Yaroslav @ 2013-08-08 16:26 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

It gets even weirder: another hack to enable F11/F12.

/n/dump/2013/0808/sys/src/cmd/usb/kb/kb.c:473,479 -
/sys/src/cmd/usb/kb/kb.c:473,479
  }


- #define hasesc1(sc) (((sc) >= 0x47) || ((sc) == 0x38))
+ #define hasesc1(sc) (((sc) >= 0x47 && (sc) < 0x57) || ((sc) > 0x58)
|| ((sc) == 0x38))

  static void
  putmod(KDev *f, uchar mods, uchar omods, uchar mask, uchar esc, uchar sc)

2013/3/1 Yaroslav <yarikos@gmail.com>:
>
>> thanks.  that one had been bugging me.  looks like it works here.
>
>
> /n/sources/patch/usb-khome
>

--
- Yaroslav



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

* Re: [9fans] usb/kb: Home key produces "7"
  2013-08-08 16:26     ` Yaroslav
@ 2014-04-04  9:26       ` Yaroslav
  2014-04-04 12:28         ` erik quanstrom
  0 siblings, 1 reply; 6+ messages in thread
From: Yaroslav @ 2014-04-04  9:26 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

finally got it complete: /n/sources/patch/usbkb-map

2013-08-08 19:26 GMT+03:00 Yaroslav <yarikos@gmail.com>:
> It gets even weirder: another hack to enable F11/F12.
>
> /n/dump/2013/0808/sys/src/cmd/usb/kb/kb.c:473,479 -
> /sys/src/cmd/usb/kb/kb.c:473,479
>   }
>
>
> - #define hasesc1(sc) (((sc) >= 0x47) || ((sc) == 0x38))
> + #define hasesc1(sc) (((sc) >= 0x47 && (sc) < 0x57) || ((sc) > 0x58)
> || ((sc) == 0x38))
>
>   static void
>   putmod(KDev *f, uchar mods, uchar omods, uchar mask, uchar esc, uchar sc)
>
> 2013/3/1 Yaroslav <yarikos@gmail.com>:
>>
>>> thanks.  that one had been bugging me.  looks like it works here.
>>
>>
>> /n/sources/patch/usb-khome
>>
>
> --
> - Yaroslav



--
- Yaroslav



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

* Re: [9fans] usb/kb: Home key produces "7"
  2014-04-04  9:26       ` Yaroslav
@ 2014-04-04 12:28         ` erik quanstrom
  0 siblings, 0 replies; 6+ messages in thread
From: erik quanstrom @ 2014-04-04 12:28 UTC (permalink / raw)
  To: 9fans

On Fri Apr  4 05:28:30 EDT 2014, yarikos@gmail.com wrote:
> finally got it complete: /n/sources/patch/usbkb-map
>

you might want to look at the atom version.  /n/sources/patch/usbkbrptnum
it also handles the kbd led so you know the state of things, and odd japanese
scan codes.

i also noticed this patch
	/n/sources/patch/koi8

it is sadly redundant, since this patch (in 9atom) has been available for a while

	;  ls -ld /n/sources/patch/maybe/koi8-u
	d-rwxrwxr-x M 1015 geoff sys 0 Dec  3  2012 /n/sources/patch/maybe/koi8-u

it was actually submitted a bit further back

	; history -D tcs.c
[...]
	Apr 24 14:05:27 EDT 2008 /n/dump/2008/1123/sys/src/cmd/tcs/tcs.c 19272 [quanstro]
	539a540
	> 	{ "koi8-u", "koi8 ukranian", Table, (void *)tabkoi8u },

cheers!

- erik



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

end of thread, other threads:[~2014-04-04 12:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-01 11:20 [9fans] usb/kb: Home key produces "7" yaroslav
2013-03-01 14:09 ` erik quanstrom
2013-03-01 15:40   ` Yaroslav
2013-08-08 16:26     ` Yaroslav
2014-04-04  9:26       ` Yaroslav
2014-04-04 12:28         ` erik quanstrom

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).