From: Lawrence S. <ljs...@us...> - 2015-04-12 23:02:18
|
I don’t see why restoring the old behavior would be a bad idea, so that all sounds good to me. Feel free to fix it up as you see fit. :) - Lawrence > On Apr 12, 2015, at 5:54 PM, Christian Groessler <ko...@ya...> wrote: > > Hi, > > when I connected a German keybaord it gave me just scancodes in the high > byte. > > Looking at kernel/arch/dreamcast/hardware/maple/keyboard.c I see that > only Japanese and > US keyboards are supported. All other keyboards just return scancodes. > > I propose the following change for unsupported keyboards to let them at > least appear as > an US keyboard. I think that's better than returning scancodes for keys > which were previously > (in older KOS versions) returned as ASCII. > > > -------------------- > --- a/kernel/arch/dreamcast/hardware/maple/keyboard.c > +++ b/kernel/arch/dreamcast/hardware/maple/keyboard.c > @@ -354,6 +354,10 @@ static int kbd_attach(maple_driver_t *drv, > maple_device_t *dev) { > else > state->region = dev->info.function_data[d] & 0xFF; > > + if (state->region > KBD_NUM_KEYMAPS) > + /* Punt #2. */ > + state->region = KBD_REGION_US; > + > /* Make sure all the queue variables are set up properly... */ > state->queue_tail = state->queue_head = state->queue_len = 0; > > -------------------- > > > And, I want to support German keyboards. They identify as region #4. > The 'keymaps' array in kernel/arch/dreamcast/hardware/maple/keyboard.c > just has entries > for (regions) #1 and #2. I don't know what region #3 is. I'd add it as > just zeroes, and add > a check in above patch to map it to an US keyboard, > > What do you think? > > regards, > chris > > > ------------------------------------------------------------------------------ > BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT > Develop your own process in accordance with the BPMN 2 standard > Learn Process modeling best practices with Bonita BPM through live exercises > http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_ > source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF > _______________________________________________ > cadcdev-kallistios mailing list > cad...@li... > https://lists.sourceforge.net/lists/listinfo/cadcdev-kallistios |