|
From: Josef Sipek on 26 Jul 2006 12:20 +#define map_key(c) \ + do { \ + usage->code = c; \ + usage->type = EV_KEY; \ + set_bit(c,input->keybit); \ + } while (0) I'm not quite sure where usage is coming from. Some magical global variable? Eeek. Josef "Jeff" Sipek. -- If I have trouble installing Linux, something is wrong. Very wrong. - Linus Torvalds - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Josef Sipek on 26 Jul 2006 21:50 On Thu, Jul 27, 2006 at 08:47:58AM +0800, liyu wrote: > Josef Sipek wrote: > > +#define map_key(c) \ > > + do { \ > > + usage->code = c; \ > > + usage->type = EV_KEY; \ > > + set_bit(c,input->keybit); \ > > + } while (0) > > > > I'm not quite sure where usage is coming from. Some magical global variable? > > Eeek. > > > > Josef "Jeff" Sipek. > > > > > These macroes like map_key() only use in nek4k_setup_usage() and > ne4k_clear_usage(), so the variable "usage" is coming from their > parameter. It is still bad. > PS: these macroes are modifed from hid-input.c Well, hid-input.c is wrong. :) Yeah, I just looked at it, and it is horid. Josef "Jeff" Sipek. -- My public GPG key can be found at http://www.josefsipek.net/gpg/public-0xC7958FFE.txt - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Pavel Machek on 28 Jul 2006 10:00 Hi! > This new version get some improvements: > > 2. Support left paren key "(", right paren key ")", equal key "=" on > right-top keypad. In fact, this keyboard generate KEYPAD_XXX usage code > for them, but I find many applications can not handle them on default > configuration, especially X.org. To get the most best usability, I use a > bit magic here: map them to "Shift+9" and "Shift+0". That is hardly 'improvement'. 'X is broken, so lets break input, too'. -- Thanks for all the (sleeping) penguins. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Dmitry Torokhov on 30 Jul 2006 21:40 On Sunday 30 July 2006 20:48, liyu wrote: > Pavel Machek Wrote: > > Hi! > > > > > >> This new version get some improvements: > >> > >> 2. Support left paren key "(", right paren key ")", equal key "=" on > >> right-top keypad. In fact, this keyboard generate KEYPAD_XXX usage code > >> for them, but I find many applications can not handle them on default > >> configuration, especially X.org. To get the most best usability, I use a > >> bit magic here: map them to "Shift+9" and "Shift+0". > >> > > > > That is hardly 'improvement'. 'X is broken, so lets break input, too'. > > > > > > > > > Well, however, this can work truly. If we do not hack as this way. > Many applications can not get its input. I think the usability for > most people should be first, but not follow rules. > I do not quite understand why X would have issues with it. KEY_KPEQUAL, KEY_KPLEFTPAREN and KEY_KPRIGHTPAREN should work fine even with legacy X keyboard driver (one that is using PS/2 protocol instead of evdev). You might want to adjust your XKB map or use xmodmap, but kernel should report true keycodes. > I think we can add one module parameter like "shift_hack" to switch it ?! > No please don't. -- Dmitry - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|
Pages: 1 Prev: [1/4] kevent: core files. Next: NMI-safe mb- and atomic-free RT RCU |