Re: keyboard issues
Hi Andreas, thanks, this works (with one minor correction - keymap array size and unhandled scancode limit bumped up by one). I'll submit my version to linux-m68k, along with the CapsLock fix. Geert - can this go through your tree, or via the input maintainers? Cheers, Michael Am 06.09.2018 um 04:16 schrieb Andreas Schwab: On Sep 05 2018, Michael Schmitz wrote: The old layout probably used the old Atari scancodes and would be useless now. The Atari keyboard driver uses a hardcoded key map as found in drivers/input/keyboard/atakbd.c (US layout) translating the Atari scancodes to Linux keycodes which I worked out from some docs found on the web, and logging raw scancodes on my Falcon. There are quite a few scancodes that I wasn't sure about (see FIXME comments in same), patches are welcome. Please try this: diff --git a/drivers/input/keyboard/atakbd.c b/drivers/input/keyboard/atakbd.c index 6f62da2909..1321e87574 100644 --- a/drivers/input/keyboard/atakbd.c +++ b/drivers/input/keyboard/atakbd.c @@ -76,7 +76,6 @@ MODULE_LICENSE("GPL"); static unsigned char atakbd_keycode[0x72] = { /* American layout */ - [0] = KEY_GRAVE, [1] = KEY_ESC, [2] = KEY_1, [3] = KEY_2, @@ -117,9 +116,9 @@ static unsigned char atakbd_keycode[0x72] = { /* American layout */ [38] = KEY_L, [39] = KEY_SEMICOLON, [40] = KEY_APOSTROPHE, - [41] = KEY_BACKSLASH, /* FIXME, '#' */ + [41] = KEY_GRAVE, [42] = KEY_LEFTSHIFT, - [43] = KEY_GRAVE, /* FIXME: '~' */ + [43] = KEY_BACKSLASH, [44] = KEY_Z, [45] = KEY_X, [46] = KEY_C, @@ -145,45 +144,34 @@ static unsigned char atakbd_keycode[0x72] = { /* American layout */ [66] = KEY_F8, [67] = KEY_F9, [68] = KEY_F10, - [69] = KEY_ESC, - [70] = KEY_DELETE, - [71] = KEY_KP7, - [72] = KEY_KP8, - [73] = KEY_KP9, + [71] = KEY_HOME, + [72] = KEY_UP, [74] = KEY_KPMINUS, - [75] = KEY_KP4, - [76] = KEY_KP5, - [77] = KEY_KP6, + [75] = KEY_LEFT, + [77] = KEY_RIGHT, [78] = KEY_KPPLUS, - [79] = KEY_KP1, - [80] = KEY_KP2, - [81] = KEY_KP3, - [82] = KEY_KP0, - [83] = KEY_KPDOT, - [90] = KEY_KPLEFTPAREN, - [91] = KEY_KPRIGHTPAREN, - [92] = KEY_KPASTERISK, /* FIXME */ - [93] = KEY_KPASTERISK, - [94] = KEY_KPPLUS, - [95] = KEY_HELP, + [80] = KEY_DOWN, + [82] = KEY_INSERT, + [83] = KEY_DELETE, [96] = KEY_102ND, - [97] = KEY_KPASTERISK, /* FIXME */ - [98] = KEY_KPSLASH, + [97] = KEY_UNDO, + [98] = KEY_HELP, [99] = KEY_KPLEFTPAREN, [100]= KEY_KPRIGHTPAREN, [101]= KEY_KPSLASH, [102]= KEY_KPASTERISK, - [103]= KEY_UP, - [104]= KEY_KPASTERISK, /* FIXME */ - [105]= KEY_LEFT, - [106]= KEY_RIGHT, - [107]= KEY_KPASTERISK, /* FIXME */ - [108]= KEY_DOWN, - [109]= KEY_KPASTERISK, /* FIXME */ - [110]= KEY_KPASTERISK, /* FIXME */ - [111]= KEY_KPASTERISK, /* FIXME */ - [112]= KEY_KPASTERISK, /* FIXME */ - [113]= KEY_KPASTERISK /* FIXME */ + [103]= KEY_KP7, + [104]= KEY_KP8, + [105]= KEY_KP9, + [106]= KEY_KP4, + [107]= KEY_KP5, + [108]= KEY_KP6, + [109]= KEY_KP1, + [110]= KEY_KP2, + [111]= KEY_KP3, + [112]= KEY_KP0, + [113]= KEY_KPDOT, + [114]= KEY_KPENTER, }; static struct input_dev *atakbd_dev; Andreas.
Re: keyboard issues
Hi Michael, On Thu, Sep 6, 2018 at 10:35 AM Michael Schmitz wrote: > thanks, this works (with one minor correction - keymap array size and > unhandled scancode limit bumped up by one). I'll submit my version to > linux-m68k, along with the CapsLock fix. > > Geert - can this go through your tree, or via the input maintainers? Via the input maintainers. > Am 06.09.2018 um 04:16 schrieb Andreas Schwab: > > On Sep 05 2018, Michael Schmitz wrote: > > > >> The old layout probably used the old Atari scancodes and would be useless > >> now. The Atari keyboard driver uses a hardcoded key map as found in > >> drivers/input/keyboard/atakbd.c (US layout) translating the Atari > >> scancodes to Linux keycodes which I worked out from some docs found on the > >> web, and logging raw scancodes on my Falcon. There are quite a few > >> scancodes that I wasn't sure about (see FIXME comments in same), patches > >> are welcome. > > > > Please try this: Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
[PATCH 0/2] input: atakbd.c bug fixes
Two bug fixes for the Atari keyboard input driver: - keymap fixes: multiple keymap errors that had gone unnoticed since migration of the m68k keyboard driver code to the input framework. Correct the wrong keycodes - keymap is stil US but keypad, help and undo keys all generate the correct keycodes now. - capslock fix: the Atari driver incorrectly assumed that capslock were a toggle key (i.e. sending no break scancodes), and synthesized a make/break keycode pair on each capslock scancode. This resulted in duplicate make/break codes on key release, and capslock functioning as a shift key. Remove code sending make/break pairs to get functional capslock behaviour. Tested on my own Atari Falcon 030. TIA for your review. Please CC linux-m68k in replies. Cheers, Michael CC to debian-68k, for consideration at the upcoming m68k hackers meeting.
[PATCH 2/2] input: atakbd.c - fix Atari CapsLock behaviour
The CapsLock key on Atari keyboards is not a toggle, it does send the normal make and break scancodes. Drop the CapsLock toggle handling code, which did cause the CapsLock key to merely act as a Shift key. Tested-by: Michael Schmitz Signed-off-by: Michael Schmitz --- drivers/input/keyboard/atakbd.c | 10 ++ 1 files changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/input/keyboard/atakbd.c b/drivers/input/keyboard/atakbd.c index e989574..6caee80 100644 --- a/drivers/input/keyboard/atakbd.c +++ b/drivers/input/keyboard/atakbd.c @@ -185,14 +185,8 @@ static void atakbd_interrupt(unsigned char scancode, char down) scancode = atakbd_keycode[scancode]; - if (scancode == KEY_CAPSLOCK) { /* CapsLock is a toggle switch key on Amiga */ - input_report_key(atakbd_dev, scancode, 1); - input_report_key(atakbd_dev, scancode, 0); - input_sync(atakbd_dev); - } else { - input_report_key(atakbd_dev, scancode, down); - input_sync(atakbd_dev); - } + input_report_key(atakbd_dev, scancode, down); + input_sync(atakbd_dev); } else /* scancodes >= 0xf3 are mouse data, most likely */ printk(KERN_INFO "atakbd: unhandled scancode %x\n", scancode); -- 1.7.0.4
[PATCH 1/2] input: atakbd.c - fix Atari keymap
From: Andreas Schwab Fix errors in Atari keymap (mostly in keypad, help and undo keys). Patch provided on debian-68k ML by Andreas Schwab , keymap array size and unhandled scancode limit adjusted to 0x73 by me. Tested-by: Michael Schmitz Signed-off-by: Michael Schmitz --- drivers/input/keyboard/atakbd.c | 64 --- 1 files changed, 26 insertions(+), 38 deletions(-) diff --git a/drivers/input/keyboard/atakbd.c b/drivers/input/keyboard/atakbd.c index 6f62da2..e989574 100644 --- a/drivers/input/keyboard/atakbd.c +++ b/drivers/input/keyboard/atakbd.c @@ -75,8 +75,7 @@ */ -static unsigned char atakbd_keycode[0x72] = { /* American layout */ - [0] = KEY_GRAVE, +static unsigned char atakbd_keycode[0x73] = { /* American layout */ [1] = KEY_ESC, [2] = KEY_1, [3] = KEY_2, @@ -117,9 +116,9 @@ [38] = KEY_L, [39] = KEY_SEMICOLON, [40] = KEY_APOSTROPHE, - [41] = KEY_BACKSLASH, /* FIXME, '#' */ + [41] = KEY_GRAVE, [42] = KEY_LEFTSHIFT, - [43] = KEY_GRAVE, /* FIXME: '~' */ + [43] = KEY_BACKSLASH, [44] = KEY_Z, [45] = KEY_X, [46] = KEY_C, @@ -145,45 +144,34 @@ [66] = KEY_F8, [67] = KEY_F9, [68] = KEY_F10, - [69] = KEY_ESC, - [70] = KEY_DELETE, - [71] = KEY_KP7, - [72] = KEY_KP8, - [73] = KEY_KP9, + [71] = KEY_HOME, + [72] = KEY_UP, [74] = KEY_KPMINUS, - [75] = KEY_KP4, - [76] = KEY_KP5, - [77] = KEY_KP6, + [75] = KEY_LEFT, + [77] = KEY_RIGHT, [78] = KEY_KPPLUS, - [79] = KEY_KP1, - [80] = KEY_KP2, - [81] = KEY_KP3, - [82] = KEY_KP0, - [83] = KEY_KPDOT, - [90] = KEY_KPLEFTPAREN, - [91] = KEY_KPRIGHTPAREN, - [92] = KEY_KPASTERISK, /* FIXME */ - [93] = KEY_KPASTERISK, - [94] = KEY_KPPLUS, - [95] = KEY_HELP, + [80] = KEY_DOWN, + [82] = KEY_INSERT, + [83] = KEY_DELETE, [96] = KEY_102ND, - [97] = KEY_KPASTERISK, /* FIXME */ - [98] = KEY_KPSLASH, + [97] = KEY_UNDO, + [98] = KEY_HELP, [99] = KEY_KPLEFTPAREN, [100]= KEY_KPRIGHTPAREN, [101]= KEY_KPSLASH, [102]= KEY_KPASTERISK, - [103]= KEY_UP, - [104]= KEY_KPASTERISK, /* FIXME */ - [105]= KEY_LEFT, - [106]= KEY_RIGHT, - [107]= KEY_KPASTERISK, /* FIXME */ - [108]= KEY_DOWN, - [109]= KEY_KPASTERISK, /* FIXME */ - [110]= KEY_KPASTERISK, /* FIXME */ - [111]= KEY_KPASTERISK, /* FIXME */ - [112]= KEY_KPASTERISK, /* FIXME */ - [113]= KEY_KPASTERISK /* FIXME */ + [103]= KEY_KP7, + [104]= KEY_KP8, + [105]= KEY_KP9, + [106]= KEY_KP4, + [107]= KEY_KP5, + [108]= KEY_KP6, + [109]= KEY_KP1, + [110]= KEY_KP2, + [111]= KEY_KP3, + [112]= KEY_KP0, + [113]= KEY_KPDOT, + [114]= KEY_KPENTER, }; static struct input_dev *atakbd_dev; @@ -191,7 +179,7 @@ static void atakbd_interrupt(unsigned char scancode, char down) { - if (scancode < 0x72) { /* scancodes < 0xf2 are keys */ + if (scancode < 0x73) { /* scancodes < 0xf3 are keys */ // report raw events here? @@ -205,7 +193,7 @@ static void atakbd_interrupt(unsigned char scancode, char down) input_report_key(atakbd_dev, scancode, down); input_sync(atakbd_dev); } - } else /* scancodes >= 0xf2 are mouse data, most likely */ + } else /* scancodes >= 0xf3 are mouse data, most likely */ printk(KERN_INFO "atakbd: unhandled scancode %x\n", scancode); return; -- 1.7.0.4
Re: [PATCH 1/2] input: atakbd.c - fix Atari keymap
On Fri, 7 Sep 2018, Michael Schmitz wrote: > From: Andreas Schwab > Andreas, because the authorship credit is yours, this patch will also need a 'Signed-off-by' tag from you before it can be merged. -- > Fix errors in Atari keymap (mostly in keypad, help and undo keys). > > Patch provided on debian-68k ML by Andreas Schwab , > keymap array size and unhandled scancode limit adjusted to 0x73 by me. > > Tested-by: Michael Schmitz > Signed-off-by: Michael Schmitz > > --- > drivers/input/keyboard/atakbd.c | 64 > --- > 1 files changed, 26 insertions(+), 38 deletions(-) >
Installing issues with debian 10-m68k on a real Amiga 4000D
Been on the list lurking for some time, and have made a few posts in the past. Read John Paul Adrian Glaubitz's post from 20th July, and downloaded the iso he listed. (https://cdimage.debian.org/cdimage/ports/10.0/m68k/iso-cd/) My config: Amiga 4000D, 2Mb chip, 4Mb Fast. Warpengine 68040@40mhz with 128Mb Ram. Cybervision64 with 4mb Ram. IDE Harddrive's tested (80gb/160Gb). IDE cdrom (I don't have any scsi drives) Acer 19" LCD on the cybervision C= 1084S on Amiga video O/S 3.1, with asim cdrom driver. Install issues: Starting the install from cd, with startinstall_cv64 results in the video not even going to the cybervision but to the 1084. Once it starts doing things, results in the display not being in sync with the c= screen. [See: http://vk3heg.net/amiga/img1.jpg & http://vk3heg.net/amiga/img2.jpg] Copying the intrid.gz, kernal & startinstall to the hd. Then modifying the startinstall script to read: amiboot -d -l vmlinux-4.16.0-1-m68k -r initrd.gz root=/dev/ram ramdisk_size=1500 fb=false debian-installer/framebuffer=false video=amifb:pal nolangchooser Results in video going to the amiga's output on the C= 1084 and I can see what's going on. The install can't detect the cdrom, so I have to tell it it's at /dev/hdb, and the install continues until the partition stage. when I get this error: "Device /dev/hda has multiple (0) logical sectors per physical sector." [http://vk3heg.net/amiga/img3.jpg] I can choose ignore, but the system comes back to the same screen. Choosing cancel goes to the install step list. Going to another console screen (alt-f2), I can't even run fdisk to look at the drive. Installing 3.1R8 on the same machine works like a dream, when choosing the cv64 install and uncompressing the intrd/kernel files. I have tested with both a 80gb & 160 Gb hd, installed 3.1 into a 500mb partition, leaving the rest blank. So guys what's your recommendations to move forward with this? -- Stephen - Vk3heg