Subject: Re: font and keyboard
To: Thomas Isenbarger <isen@plantpath.wisc.edu>
From: pete hilton <saruman@ruvolo-hilton.org>
List: port-hpcmips
Date: 12/13/2006 12:38:35
--Boundary-00=_MTGgFRhvGpxdqob
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
On Wednesday 13 December 2006 06:23 am, Thomas Isenbarger wrote:
> I would like to change the console font smaller (or possibly change
> it to something else). Is this possible and easily done? Do I do it
> through wsconctl?
>
> Also, is there a way to map the Alt, Windows, and Fn keys to meta
> keys for things like emacs?
>
> Thanks,
> Tom Isenbarger
Hi there,
I made several changes to get the pageup/pagedown keys etc
(those which need to be pressed with the "alt" key) to work. I also changed
"numlock" to be "insert". This is for the IBM Z50.
In r3.0 I hit the following:-
/usr/src/sys/dev/hpc/hpckbdkeymap.h
/usr/src/sys/dev/hpc/hpckbd.c
/usr/src/sys/dev/pckbport/wskbdmap_mfii.c
/usr/src/sys/dev/wscons/wsemul_vt100_keys.c
I have attached a diff file to show what I did but YMMV
cheers
pete
:
--
pete hilton
saruman@ruvolo-hilton.org
IsaBella --- ICE Explorer #1070
--Boundary-00=_MTGgFRhvGpxdqob
Content-Type: text/x-diff;
charset="iso-8859-1";
name="netbsd.r3.keyboard.diffs"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename="netbsd.r3.keyboard.diffs"
Diffing ./usr/src/sys/dev/hpc/hpckbdkeymap.h
38a39
> #define KEY_ALT 56 /* Alt key */
230c231
< /*30*/ IGN, 14, 69, 14, IGN, 43, 28, 57,
---
> /*30*/ IGN, 14, 210, 83, IGN, 43, 28, 57,
Diffing ./usr/src/sys/dev/hpc/hpckbd.c
82a83
> int hc_alt_state;
201a203
> hc->hc_alt_state = WSCONS_EVENT_KEY_UP;
337,343c339,350
< if (flag) {
< type = WSCONS_EVENT_KEY_DOWN;
< } else {
< type = WSCONS_EVENT_KEY_UP;
< }
<
< if ((key = hc->hc_keymap[scancode]) == UNK) {
---
> if (flag)
> {
> type = WSCONS_EVENT_KEY_DOWN;
> }
> else
> {
> type = WSCONS_EVENT_KEY_UP;
> };
>
> key = hc->hc_keymap[scancode];
>
> if ( key == UNK) {
377a385,418
>
> if ( key == KEY_ALT )
> {
> hc->hc_alt_state = type;
> };
>
> /*
> * For Z50 Workpad .. make dependent on platid
> * change the alt-shifted arrow keys
> * so we can process them asif they were seperate keys
> */
> if ( hc->hc_alt_state == WSCONS_EVENT_KEY_DOWN )
> {
> switch (key)
> {
> case 200: /* up to page up */
> key = 201;
> break;
>
> case 208: /* down to page down */
> key = 209;
> break;
>
> case 203: /* left to home */
> key = 199;
> break;
>
> case 205: /* right to end */
> key = 207;
> break;
>
> };
> };
>
379c420
< if (hpckbd_putevent(hc, type, hc->hc_keymap[scancode]) == 0)
---
> if (hpckbd_putevent(hc, type, key) == 0)
386c427
< n = pckbd_encode(type, hc->hc_keymap[scancode], data);
---
> n = pckbd_encode(type, key, data);
390c431
< wskbd_input(hc->hc_wskbddev, type, hc->hc_keymap[scancode]);
---
> wskbd_input(hc->hc_wskbddev, type, key);
Diffing ./usr/src/sys/dev/pckbport/wskbdmap_mfii.c
109,118c109,118
< KC(59), KS_Cmd_Screen0, KS_f1,
< KC(60), KS_Cmd_Screen1, KS_f2,
< KC(61), KS_Cmd_Screen2, KS_f3,
< KC(62), KS_Cmd_Screen3, KS_f4,
< KC(63), KS_Cmd_Screen4, KS_f5,
< KC(64), KS_Cmd_Screen5, KS_f6,
< KC(65), KS_Cmd_Screen6, KS_f7,
< KC(66), KS_Cmd_Screen7, KS_f8,
< KC(67), KS_Cmd_Screen8, KS_f9,
< KC(68), KS_Cmd_Screen9, KS_f10,
---
> KC(59), KS_Cmd_Screen0, KS_f1, KS_F1,
> KC(60), KS_Cmd_Screen1, KS_f2, KS_F2,
> KC(61), KS_Cmd_Screen2, KS_f3, KS_F3,
> KC(62), KS_Cmd_Screen3, KS_f4, KS_F4,
> KC(63), KS_Cmd_Screen4, KS_f5, KS_F5,
> KC(64), KS_Cmd_Screen5, KS_f6, KS_F6,
> KC(65), KS_Cmd_Screen6, KS_f7, KS_F7,
> KC(66), KS_Cmd_Screen7, KS_f8, KS_F8,
> KC(67), KS_Cmd_Screen8, KS_f9, KS_F9,
> KC(68), KS_Cmd_Screen9, KS_f10, KS_F10,
134,135c134,136
< KC(87), KS_f11,
< KC(88), KS_f12,
---
> KC(84), KS_BackSpace,
> KC(87), KS_f11, KS_F11,
> KC(88), KS_f12, KS_F12,
147c148
< KC(200), KS_Up,
---
> KC(200), KS_Up,
152c153
< KC(208), KS_Down,
---
> KC(208), KS_Down,
Diffing ./usr/src/sys/dev/wscons/wsemul_vt100_keys.c
63a64,78
> static char *vt100_Fkeys[] = {
> "\033[51~", /* F1 */
> "\033[52~", /* F2 */
> "\033[53~", /* F3 */
> "\033[54~", /* F4 */
> "\033[55~", /* F5 */
> "\033[57~", /* F6 */
> "\033[58~", /* F7 */
> "\033[59~", /* F8 */
> "\033[60~", /* F9 */
> "\033[61~", /* F10 */
> "\033[63~", /* F11 */
> "\033[64~", /* F12 */
> };
>
95c110
< *out = vt100_fkeys[in - KS_F1];
---
> *out = vt100_Fkeys[in - KS_F1];
--Boundary-00=_MTGgFRhvGpxdqob--