9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] Trying to make 9front work on QWERTZ
@ 2019-07-27  9:21 cinap_lenrek
  2019-07-27 19:18 ` Jens K. Loewe
  0 siblings, 1 reply; 9+ messages in thread
From: cinap_lenrek @ 2019-07-27  9:21 UTC (permalink / raw)
  To: 9fans

on my t23, which has physical german keyboard layout, the scancode
for the [<>|] key left to the [Y] key is 0x56 (86 decimal), which
is not mapped with us layout.

tho this is mapped in german keyboard layout:

term% grep '	86' /sys/lib/kbmap/de
0	86	'<
1	86	'>
2	86	0
3	86	'|
4	86	0

running the following on my t23 maps it.

term% echo '0 0x56 ''<' > /dev/kbmap
term% echo '1 0x56 ''>' > /dev/kbmap
term% echo '3 0x56 ''|' > /dev/kbmap

maybe your keyboard produces a different scancode?

you can attach ratrace to kbdfs [scanproc] pid and look what
it reads back from /dev/scancode for a ps2 keyboard.
usb keyboards work differently.

you can bring back that scancode debug thing with F11/F12
with the following patch which should work for both ps2 and usb
keyboards.

--- a/sys/src/cmd/aux/kbdfs/kbdfs.c	Thu Jul 25 17:44:47 2019 +0200
+++ b/sys/src/cmd/aux/kbdfs/kbdfs.c	Sat Jul 27 11:12:20 2019 +0200
@@ -43,6 +43,7 @@
 	int	alt;
 	int	altgr;
 	int	leds;
+	int	debug;
 };

 struct Qtab {
@@ -337,6 +338,9 @@
 {
 	Key key;

+	if(scan->debug)
+		fprint(2, "kbdputsc %#p sc %x esc1 %d esc2 %d\n", scan, c, scan->esc1, scan->esc2);
+
 	/*
 	 *  e0's is the first of a 2 character sequence, e1 and e2 the first
 	 *  of a 3 character sequence (on the safari)
@@ -390,6 +394,13 @@
 	if(scan->ctl && scan->alt && key.r == Kdel)
 		reboot();

+	if(key.down){
+		if(key.b == (KF|11))
+			scan->debug = 1;
+		if(key.b == (KF|12))
+			scan->debug = 0;
+	}
+
 	if(key.b)
 		send(keychan, &key);

after applying that change, run mk install in /sys/src/cmd/aux/kbdfs
and then rebuild the kernel (as kbdfs gets included into the kernel image).

--
cinap



^ permalink raw reply	[flat|nested] 9+ messages in thread
* Re: [9fans] Trying to make 9front work on QWERTZ
@ 2019-07-26 19:54 Jonas Amoson
  0 siblings, 0 replies; 9+ messages in thread
From: Jonas Amoson @ 2019-07-26 19:54 UTC (permalink / raw)
  To: 9fans

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

I am not sure I will solve your problem, but maybe give some
input. I had a similar problem (That the '<' key to the right of
the left shift key on ISO-style keyboards didn't work) on a Bell
Labs Plan 9 on my Raspberry PI (though it might nowadays, it is
an old installation on that sdcard). It does however work on 9front
on my Pi. If I remember correctly, I had the key working on a PC
running Bell Labs Plan 9 if I connected the keyboard to PS/2, but
not when connected to USB using a converter. But again, on 9front
it works both on PS/2 and USB on that PC for me.

Jonas


<-----Ursprungligt Meddelande----->

 	 	From: Jens K. Loewe [jens.k.loewe@gmail.com]
Sent: 24/7/2019 9:57:27 PM
To: 9fans@9fans.net
Subject: [9fans] Trying to make 9front work on QWERTZ

Ahoy,

I've been trying to give 9front a test ride for a while now, and I'm
stuck with one specific problem.

So I have a German keyboard layout where <, > and | are on the same
key. However, while I have no problems with these keys, in 9front the
key seems to be dead on all of my keyboards. I tried quite a lot of
them, both inside QEMU on two different computers and on a dedicated
ThinkPad. Also, using the de layout does not fix that.

Is that a known problem or a configuration error?

.


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

^ permalink raw reply	[flat|nested] 9+ messages in thread
* [9fans] Trying to make 9front work on QWERTZ
@ 2019-07-24 19:01 Jens K. Loewe
  2019-07-24 21:04 ` Ole-Hjalmar Kristensen
  0 siblings, 1 reply; 9+ messages in thread
From: Jens K. Loewe @ 2019-07-24 19:01 UTC (permalink / raw)
  To: 9fans

Ahoy,

I've been trying to give 9front a test ride for a while now, and I'm
stuck with one specific problem.

So I have a German keyboard layout where <, > and | are on the same
key. However, while I have no problems with these keys, in 9front the
key seems to be dead on all of my keyboards. I tried quite a lot of
them, both inside QEMU on two different computers and on a dedicated
ThinkPad. Also, using the de layout does not fix that.

Is that a known problem or a configuration error?



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

end of thread, other threads:[~2019-07-27 19:18 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-27  9:21 [9fans] Trying to make 9front work on QWERTZ cinap_lenrek
2019-07-27 19:18 ` Jens K. Loewe
  -- strict thread matches above, loose matches on Subject: below --
2019-07-26 19:54 Jonas Amoson
2019-07-24 19:01 Jens K. Loewe
2019-07-24 21:04 ` Ole-Hjalmar Kristensen
2019-07-25  7:17   ` Rodrigo G. López
2019-07-25 11:40     ` Jens K. Loewe
2019-07-26  5:59       ` Lucio De Re
2019-07-26 16:10         ` Jens K. Loewe

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