* Fn + [KEYS] question @ 2009-09-16 7:24 Xiangfu Liu 2009-09-16 7:32 ` Dmitry Torokhov 0 siblings, 1 reply; 13+ messages in thread From: Xiangfu Liu @ 2009-09-16 7:24 UTC (permalink / raw) To: linux-input Hi I know in the IBM laptop, you use Fn + F1 to do something. I want [Fn + U = 7] in my device. when you press Fn + U in the terminal it will display '7'. I look into the keyboard.c file. but don't know which function is handle the Fn key? there is [1] in the keyboard.h file. I don't know which Fn key belong. is it KT_SHIFT??? thanks for any advice. [1] ------------- #define KT_LATIN 0 /* we depend on this being zero */ #define KT_LETTER 11 /* symbol that can be acted upon by CapsLock */ #define KT_FN 1 #define KT_SPEC 2 #define KT_PAD 3 #define KT_DEAD 4 #define KT_CONS 5 #define KT_CUR 6 #define KT_SHIFT 7 #define KT_META 8 #define KT_ASCII 9 #define KT_LOCK 10 #define KT_SLOCK 12 #define KT_DEAD2 13 #define KT_BRL 14 -- Xiangfu Liu Email: xiangfu at qi-hardware dot com Web: http://www.qi-hardware.com ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Fn + [KEYS] question 2009-09-16 7:24 Fn + [KEYS] question Xiangfu Liu @ 2009-09-16 7:32 ` Dmitry Torokhov 2009-09-16 7:43 ` Xiangfu Liu 0 siblings, 1 reply; 13+ messages in thread From: Dmitry Torokhov @ 2009-09-16 7:32 UTC (permalink / raw) To: Xiangfu Liu; +Cc: linux-input On Wed, Sep 16, 2009 at 03:24:13PM +0800, Xiangfu Liu wrote: > Hi > > I know in the IBM laptop, you use Fn + F1 to do something. > I want [Fn + U = 7] in my device. > when you press Fn + U in the terminal it will display '7'. > > > I look into the keyboard.c file. > but don't know which function is handle the Fn key? > > there is [1] in the keyboard.h file. I don't know > which Fn key belong. is it KT_SHIFT??? > Fn in laptops usually handled by firmware (OS does not see the scancode for Fn at all). In your driver you will probably have to handle it manually and adjust which keycode you emit (KEY_Y or KEY_7) depending on whether Fn is active or not. I'd recommend not hardcoding KEY_* but actually "shift" to different part of driver keymap so userspace could change the keycodes if it wishes to do so. -- Dmitry ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Fn + [KEYS] question 2009-09-16 7:32 ` Dmitry Torokhov @ 2009-09-16 7:43 ` Xiangfu Liu 2009-09-16 8:06 ` Dmitry Torokhov 0 siblings, 1 reply; 13+ messages in thread From: Xiangfu Liu @ 2009-09-16 7:43 UTC (permalink / raw) To: Dmitry Torokhov; +Cc: linux-input Dmitry Torokhov wrote: > On Wed, Sep 16, 2009 at 03:24:13PM +0800, Xiangfu Liu wrote: >> Hi >> >> I know in the IBM laptop, you use Fn + F1 to do something. >> I want [Fn + U = 7] in my device. >> when you press Fn + U in the terminal it will display '7'. >> >> >> I look into the keyboard.c file. >> but don't know which function is handle the Fn key? >> >> there is [1] in the keyboard.h file. I don't know >> which Fn key belong. is it KT_SHIFT??? >> > > Fn in laptops usually handled by firmware (OS does not see the scancode > for Fn at all). In your driver you will probably have to handle it > manually and adjust which keycode you emit (KEY_Y or KEY_7) depending on > whether Fn is active or not. I'd recommend not hardcoding KEY_* but > actually "shift" to different part of driver keymap so userspace could > change the keycodes if it wishes to do so. Hi Dmitry thanks for the reply. see [1], I change the [Red arrow] key to [ALTGR] then I can easy change the defkeymap.map. make all the red keys work. but for the [Blue Fn] key. I don't know how to make it work in keymap? there is [SHIFT] [CONTROL] [SHIFT] [ALTGR] four modifier keys. all used. so I can not may the [Fn] to those four modifier keys. can I make the leftAlt and rightAlt generate different keys? like: LeftAlt + 'U' = Alt + 'U' RightAlt + 'U' = '7' thanks for help. [1] http://downloads.qi-hardware.com/hardware/mechanical/ben/2009_08_26/keyboard_problem_2.JPG > -- Xiangfu Liu Email: xiangfu at qi-hardware dot com Web: http://www.qi-hardware.com ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Fn + [KEYS] question 2009-09-16 7:43 ` Xiangfu Liu @ 2009-09-16 8:06 ` Dmitry Torokhov 2009-09-16 9:25 ` Xiangfu Liu 0 siblings, 1 reply; 13+ messages in thread From: Dmitry Torokhov @ 2009-09-16 8:06 UTC (permalink / raw) To: Xiangfu Liu; +Cc: linux-input On Wed, Sep 16, 2009 at 03:43:19PM +0800, Xiangfu Liu wrote: > Dmitry Torokhov wrote: > > On Wed, Sep 16, 2009 at 03:24:13PM +0800, Xiangfu Liu wrote: > >> Hi > >> > >> I know in the IBM laptop, you use Fn + F1 to do something. > >> I want [Fn + U = 7] in my device. > >> when you press Fn + U in the terminal it will display '7'. > >> > >> > >> I look into the keyboard.c file. > >> but don't know which function is handle the Fn key? > >> > >> there is [1] in the keyboard.h file. I don't know > >> which Fn key belong. is it KT_SHIFT??? > >> > > > > Fn in laptops usually handled by firmware (OS does not see the scancode > > for Fn at all). In your driver you will probably have to handle it > > manually and adjust which keycode you emit (KEY_Y or KEY_7) depending on > > whether Fn is active or not. I'd recommend not hardcoding KEY_* but > > actually "shift" to different part of driver keymap so userspace could > > change the keycodes if it wishes to do so. > Hi Dmitry > thanks for the reply. > see [1], I change the [Red arrow] key to [ALTGR] then I can easy change the > defkeymap.map. make all the red keys work. > > but for the [Blue Fn] key. I don't know how to make it work in keymap? > there is [SHIFT] [CONTROL] [SHIFT] [ALTGR] four modifier keys. > all used. so I can not may the [Fn] to those four modifier keys. > > can I make the leftAlt and rightAlt generate different keys? > like: > LeftAlt + 'U' = Alt + 'U' > RightAlt + 'U' = '7' > Keyboard driver supports 9 modifiers total, you should be able use one of these for your numeric buttons. -- Dmitry ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Fn + [KEYS] question 2009-09-16 8:06 ` Dmitry Torokhov @ 2009-09-16 9:25 ` Xiangfu Liu 2009-09-16 14:44 ` Xiangfu Liu 0 siblings, 1 reply; 13+ messages in thread From: Xiangfu Liu @ 2009-09-16 9:25 UTC (permalink / raw) To: Dmitry Torokhov; +Cc: linux-input Hi Dmitry >> thanks for the reply. >> see [1], I change the [Red arrow] key to [ALTGR] then I can easy change the >> defkeymap.map. make all the red keys work. >> >> but for the [Blue Fn] key. I don't know how to make it work in keymap? >> there is [SHIFT] [CONTROL] [SHIFT] [ALTGR] four modifier keys. >> all used. so I can not may the [Fn] to those four modifier keys. >> >> can I make the leftAlt and rightAlt generate different keys? >> like: >> LeftAlt + 'U' = Alt + 'U' >> RightAlt + 'U' = '7' >> > > Keyboard driver supports 9 modifiers total, you should be able use one > of these for your numeric buttons. > oh. can you give me some tips on the other modifiers. how to define them? can I just change the defkeymap.map file? or I must change the source code? -- Xiangfu Liu Email: xiangfu at qi-hardware dot com Web: http://www.qi-hardware.com ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Fn + [KEYS] question 2009-09-16 9:25 ` Xiangfu Liu @ 2009-09-16 14:44 ` Xiangfu Liu 2009-09-16 16:33 ` Dmitry Torokhov 0 siblings, 1 reply; 13+ messages in thread From: Xiangfu Liu @ 2009-09-16 14:44 UTC (permalink / raw) To: Dmitry Torokhov; +Cc: linux-input Xiangfu Liu wrote: > Hi Dmitry > >>> thanks for the reply. >>> see [1], I change the [Red arrow] key to [ALTGR] then I can easy change the >>> defkeymap.map. make all the red keys work. >>> >>> but for the [Blue Fn] key. I don't know how to make it work in keymap? >>> there is [SHIFT] [CONTROL] [SHIFT] [ALTGR] four modifier keys. >>> all used. so I can not may the [Fn] to those four modifier keys. >>> >>> can I make the leftAlt and rightAlt generate different keys? >>> like: >>> LeftAlt + 'U' = Alt + 'U' >>> RightAlt + 'U' = '7' >>> >> Keyboard driver supports 9 modifiers total, you should be able use one >> of these for your numeric buttons. >> > > oh. can you give me some tips on the other modifiers. > how to define them? > can I just change the defkeymap.map file? > or I must change the source code? > Hi Dmitry I found this[1] in the 'man keymaps', three are 9 modifiers. but the in defkaymap.map, there is alwasy like: control keycode 53 = Delete there is no ctrll in the defkeymap.map. how to implement this? ShiftL + u = U ShiflR + u = 7 thansk for help [1] Which of the actions bound to a given key is taken when it is pressed depends on what modifiers are in effect at that moment. The keyboard driver supports 9 modifiers. These modifiers are labeled (completely arbitrarily) Shift, AltGr, Control, Alt, ShiftL, ShiftR, CtrlL, CtrlR and CapsShift. Each of these modifiers has an associated weight of power of two according to the following table: modifier weight Shift 1 AltGr 2 Control 4 Alt 8 ShiftL 16 ShiftR 32 CtrlL 64 CtrlR 128 CapsShift 256 -- Xiangfu Liu Email: xiangfu at qi-hardware dot com Web: http://www.qi-hardware.com ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Fn + [KEYS] question 2009-09-16 14:44 ` Xiangfu Liu @ 2009-09-16 16:33 ` Dmitry Torokhov 2009-09-16 17:24 ` Xiangfu Liu 0 siblings, 1 reply; 13+ messages in thread From: Dmitry Torokhov @ 2009-09-16 16:33 UTC (permalink / raw) To: Xiangfu Liu; +Cc: linux-input On Wed, Sep 16, 2009 at 10:44:01PM +0800, Xiangfu Liu wrote: > Xiangfu Liu wrote: > > Hi Dmitry > > > >>> thanks for the reply. > >>> see [1], I change the [Red arrow] key to [ALTGR] then I can easy change the > >>> defkeymap.map. make all the red keys work. > >>> > >>> but for the [Blue Fn] key. I don't know how to make it work in keymap? > >>> there is [SHIFT] [CONTROL] [SHIFT] [ALTGR] four modifier keys. > >>> all used. so I can not may the [Fn] to those four modifier keys. > >>> > >>> can I make the leftAlt and rightAlt generate different keys? > >>> like: > >>> LeftAlt + 'U' = Alt + 'U' > >>> RightAlt + 'U' = '7' > >>> > >> Keyboard driver supports 9 modifiers total, you should be able use one > >> of these for your numeric buttons. > >> > > > > oh. can you give me some tips on the other modifiers. > > how to define them? > > can I just change the defkeymap.map file? > > or I must change the source code? > > > Hi Dmitry I found this[1] in the 'man keymaps', three are 9 modifiers. > but the in defkaymap.map, there is alwasy like: > > control keycode 53 = Delete > > there is no ctrll in the defkeymap.map. > how to implement this? > > ShiftL + u = U > ShiflR + u = 7 > The same as with AltGr you need to do keycode XX = CtrlR and then keycode YY = u shift keycode YY = U ctrlr keycode YY = seven Let me know if this works. -- Dmitry ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Fn + [KEYS] question 2009-09-16 16:33 ` Dmitry Torokhov @ 2009-09-16 17:24 ` Xiangfu Liu 2009-09-16 17:40 ` Dmitry Torokhov 0 siblings, 1 reply; 13+ messages in thread From: Xiangfu Liu @ 2009-09-16 17:24 UTC (permalink / raw) To: Dmitry Torokhov; +Cc: linux-input Dmitry Torokhov wrote: > On Wed, Sep 16, 2009 at 10:44:01PM +0800, Xiangfu Liu wrote: >> Xiangfu Liu wrote: >>> Hi Dmitry >>> >>>>> thanks for the reply. >>>>> see [1], I change the [Red arrow] key to [ALTGR] then I can easy change the >>>>> defkeymap.map. make all the red keys work. >>>>> >>>>> but for the [Blue Fn] key. I don't know how to make it work in keymap? >>>>> there is [SHIFT] [CONTROL] [SHIFT] [ALTGR] four modifier keys. >>>>> all used. so I can not may the [Fn] to those four modifier keys. >>>>> >>>>> can I make the leftAlt and rightAlt generate different keys? >>>>> like: >>>>> LeftAlt + 'U' = Alt + 'U' >>>>> RightAlt + 'U' = '7' >>>>> >>>> Keyboard driver supports 9 modifiers total, you should be able use one >>>> of these for your numeric buttons. >>>> >>> oh. can you give me some tips on the other modifiers. >>> how to define them? >>> can I just change the defkeymap.map file? >>> or I must change the source code? >>> >> Hi Dmitry I found this[1] in the 'man keymaps', three are 9 modifiers. >> but the in defkaymap.map, there is alwasy like: >> >> control keycode 53 = Delete >> >> there is no ctrll in the defkeymap.map. >> how to implement this? >> >> ShiftL + u = U >> ShiflR + u = 7 >> > > The same as with AltGr you need to do > > keycode XX = CtrlR > > and then > > keycode YY = u > shift keycode YY = U > ctrlr keycode YY = seven Hi Dmitry thanks for the reply. I test this, it's not work. ---------- $ loadkeys -m defkeymap.map > defkeymap.c && rm defkeymap.o loadkeys: defkeymap.map:71: adding map 64 violates explicit keymaps line I look into the keyboard.c, in the kbd_keycode function seems this "keysym = key_map[keycode];" make the CtrlL and CtrlR map to the Ctrl. so I change the keyboard.c[1] code like: 1. when press CtrlR pass, change back the Ctrl to CtrlR. 2. in the k_shift function set a sign [shift_right] to 1 3. change the CtrlR to Ctrl in k_shift funtion. other code will only know the Ctrl. not the CtrlR. 4. when press "u" and [shift_right] is true change the keysym to "1" others are same. _I think the code is not good. so if someone have any idea._ _just let me know._ thanks. [1] ----------------------- @@ -800,7 +805,15 @@ static void k_shift(struct vc_data *vc, unsigned char value, char up_flag) clr_vc_kbd_led(kbd, VC_CAPSLOCK); } + if (value == KVAL(K_CTRLR)) { + shift_right = 1; + value = KVAL(K_CTRL); + } + if (up_flag) { + shift_right = 0; /* * handle the case that two shift or control * keys are depressed simultaneously @@ -1284,6 +1297,20 @@ static void kbd_keycode(unsigned int keycode, int down, int hw_raw) if (raw_mode && type != KT_SPEC && type != KT_SHIFT) return; + if (keysym == 61461 && shift_right == 1)//61461 is CtrlR + U + keysym = 61489; //61489 is "1" + if (keysym == 61449 && shift_right == 1) + keysym = 61490; + if (keysym == 64367 && shift_right == 1) + keysym = 61491; + + if (keycode == KEY_RIGHTCTRL) + keysym += 5; //KEY_CTRL = 2 //KEY_RIGHTCTRL = 7 form the keyboard.h file (*k_handler[type])(vc, keysym & 0xff, !down); param.ledstate = kbd->ledflagstate; > > Let me know if this works. > -- Xiangfu Liu Email: xiangfu at qi-hardware dot com Web: http://www.qi-hardware.com ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Fn + [KEYS] question 2009-09-16 17:24 ` Xiangfu Liu @ 2009-09-16 17:40 ` Dmitry Torokhov 2009-09-17 2:31 ` Xiangfu Liu 0 siblings, 1 reply; 13+ messages in thread From: Dmitry Torokhov @ 2009-09-16 17:40 UTC (permalink / raw) To: Xiangfu Liu; +Cc: linux-input On Wednesday 16 September 2009 10:24:25 am Xiangfu Liu wrote: > Dmitry Torokhov wrote: > > On Wed, Sep 16, 2009 at 10:44:01PM +0800, Xiangfu Liu wrote: > >> Xiangfu Liu wrote: > >>> Hi Dmitry > >>> > >>>>> thanks for the reply. > >>>>> see [1], I change the [Red arrow] key to [ALTGR] then I can easy > >>>>> change the defkeymap.map. make all the red keys work. > >>>>> > >>>>> but for the [Blue Fn] key. I don't know how to make it work in > >>>>> keymap? there is [SHIFT] [CONTROL] [SHIFT] [ALTGR] four modifier > >>>>> keys. all used. so I can not may the [Fn] to those four modifier > >>>>> keys. > >>>>> > >>>>> can I make the leftAlt and rightAlt generate different keys? > >>>>> like: > >>>>> LeftAlt + 'U' = Alt + 'U' > >>>>> RightAlt + 'U' = '7' > >>>> > >>>> Keyboard driver supports 9 modifiers total, you should be able use one > >>>> of these for your numeric buttons. > >>> > >>> oh. can you give me some tips on the other modifiers. > >>> how to define them? > >>> can I just change the defkeymap.map file? > >>> or I must change the source code? > >> > >> Hi Dmitry I found this[1] in the 'man keymaps', three are 9 modifiers. > >> but the in defkaymap.map, there is alwasy like: > >> > >> control keycode 53 = Delete > >> > >> there is no ctrll in the defkeymap.map. > >> how to implement this? > >> > >> ShiftL + u = U > >> ShiflR + u = 7 > > > > The same as with AltGr you need to do > > > > keycode XX = CtrlR > > > > and then > > > > keycode YY = u > > shift keycode YY = U > > ctrlr keycode YY = seven > > Hi Dmitry > thanks for the reply. I test this, it's not work. > ---------- > $ loadkeys -m defkeymap.map > defkeymap.c && rm defkeymap.o > loadkeys: defkeymap.map:71: adding map 64 violates explicit keymaps line You need to fix this ^^^^ first. -- Dmitry ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Fn + [KEYS] question 2009-09-16 17:40 ` Dmitry Torokhov @ 2009-09-17 2:31 ` Xiangfu Liu 2009-09-18 5:45 ` Dmitry Torokhov 0 siblings, 1 reply; 13+ messages in thread From: Xiangfu Liu @ 2009-09-17 2:31 UTC (permalink / raw) To: Dmitry Torokhov; +Cc: linux-input Dmitry Torokhov wrote: > On Wednesday 16 September 2009 10:24:25 am Xiangfu Liu wrote: >> Dmitry Torokhov wrote: >>> On Wed, Sep 16, 2009 at 10:44:01PM +0800, Xiangfu Liu wrote: >>>> Xiangfu Liu wrote: >>>>> Hi Dmitry >>>>> >>>>>>> thanks for the reply. >>>>>>> see [1], I change the [Red arrow] key to [ALTGR] then I can easy >>>>>>> change the defkeymap.map. make all the red keys work. >>>>>>> >>>>>>> but for the [Blue Fn] key. I don't know how to make it work in >>>>>>> keymap? there is [SHIFT] [CONTROL] [SHIFT] [ALTGR] four modifier >>>>>>> keys. all used. so I can not may the [Fn] to those four modifier >>>>>>> keys. >>>>>>> >>>>>>> can I make the leftAlt and rightAlt generate different keys? >>>>>>> like: >>>>>>> LeftAlt + 'U' = Alt + 'U' >>>>>>> RightAlt + 'U' = '7' >>>>>> Keyboard driver supports 9 modifiers total, you should be able use one >>>>>> of these for your numeric buttons. >>>>> oh. can you give me some tips on the other modifiers. >>>>> how to define them? >>>>> can I just change the defkeymap.map file? >>>>> or I must change the source code? >>>> Hi Dmitry I found this[1] in the 'man keymaps', three are 9 modifiers. >>>> but the in defkaymap.map, there is alwasy like: >>>> >>>> control keycode 53 = Delete >>>> >>>> there is no ctrll in the defkeymap.map. >>>> how to implement this? >>>> >>>> ShiftL + u = U >>>> ShiflR + u = 7 >>> The same as with AltGr you need to do >>> >>> keycode XX = CtrlR >>> >>> and then >>> >>> keycode YY = u >>> shift keycode YY = U >>> ctrlr keycode YY = seven >> Hi Dmitry >> thanks for the reply. I test this, it's not work. >> ---------- >> $ loadkeys -m defkeymap.map > defkeymap.c && rm defkeymap.o >> loadkeys: defkeymap.map:71: adding map 64 violates explicit keymaps line > > You need to fix this ^^^^ first. > the line 71 is the "ctrlr ....", so I think the defkeymap.map not support the "ctrlr". -- Xiangfu Liu Email: xiangfu at qi-hardware dot com Web: http://www.qi-hardware.com ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Fn + [KEYS] question 2009-09-17 2:31 ` Xiangfu Liu @ 2009-09-18 5:45 ` Dmitry Torokhov 2009-09-18 6:45 ` Xiangfu Liu 0 siblings, 1 reply; 13+ messages in thread From: Dmitry Torokhov @ 2009-09-18 5:45 UTC (permalink / raw) To: Xiangfu Liu; +Cc: linux-input On Thu, Sep 17, 2009 at 10:31:56AM +0800, Xiangfu Liu wrote: > Dmitry Torokhov wrote: > > On Wednesday 16 September 2009 10:24:25 am Xiangfu Liu wrote: > >> Dmitry Torokhov wrote: > >>> On Wed, Sep 16, 2009 at 10:44:01PM +0800, Xiangfu Liu wrote: > >>>> Xiangfu Liu wrote: > >>>>> Hi Dmitry > >>>>> > >>>>>>> thanks for the reply. > >>>>>>> see [1], I change the [Red arrow] key to [ALTGR] then I can easy > >>>>>>> change the defkeymap.map. make all the red keys work. > >>>>>>> > >>>>>>> but for the [Blue Fn] key. I don't know how to make it work in > >>>>>>> keymap? there is [SHIFT] [CONTROL] [SHIFT] [ALTGR] four modifier > >>>>>>> keys. all used. so I can not may the [Fn] to those four modifier > >>>>>>> keys. > >>>>>>> > >>>>>>> can I make the leftAlt and rightAlt generate different keys? > >>>>>>> like: > >>>>>>> LeftAlt + 'U' = Alt + 'U' > >>>>>>> RightAlt + 'U' = '7' > >>>>>> Keyboard driver supports 9 modifiers total, you should be able use one > >>>>>> of these for your numeric buttons. > >>>>> oh. can you give me some tips on the other modifiers. > >>>>> how to define them? > >>>>> can I just change the defkeymap.map file? > >>>>> or I must change the source code? > >>>> Hi Dmitry I found this[1] in the 'man keymaps', three are 9 modifiers. > >>>> but the in defkaymap.map, there is alwasy like: > >>>> > >>>> control keycode 53 = Delete > >>>> > >>>> there is no ctrll in the defkeymap.map. > >>>> how to implement this? > >>>> > >>>> ShiftL + u = U > >>>> ShiflR + u = 7 > >>> The same as with AltGr you need to do > >>> > >>> keycode XX = CtrlR > >>> > >>> and then > >>> > >>> keycode YY = u > >>> shift keycode YY = U > >>> ctrlr keycode YY = seven > >> Hi Dmitry > >> thanks for the reply. I test this, it's not work. > >> ---------- > >> $ loadkeys -m defkeymap.map > defkeymap.c && rm defkeymap.o > >> loadkeys: defkeymap.map:71: adding map 64 violates explicit keymaps line > > > > You need to fix this ^^^^ first. > > > the line 71 is the "ctrlr ....", so I think the defkeymap.map not support > the "ctrlr". > Please look at the very beginning of the file where there is "keymaps" statement - you need to enable keymap 64. -- Dmitry ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Fn + [KEYS] question 2009-09-18 5:45 ` Dmitry Torokhov @ 2009-09-18 6:45 ` Xiangfu Liu 2009-09-18 6:49 ` Dmitry Torokhov 0 siblings, 1 reply; 13+ messages in thread From: Xiangfu Liu @ 2009-09-18 6:45 UTC (permalink / raw) To: Dmitry Torokhov; +Cc: linux-input Dmitry Torokhov wrote: > On Thu, Sep 17, 2009 at 10:31:56AM +0800, Xiangfu Liu wrote: >> Dmitry Torokhov wrote: >>> On Wednesday 16 September 2009 10:24:25 am Xiangfu Liu wrote: >>>> Dmitry Torokhov wrote: >>>>> On Wed, Sep 16, 2009 at 10:44:01PM +0800, Xiangfu Liu wrote: >>>>>> Xiangfu Liu wrote: >>>>>>> Hi Dmitry >>>>>>> >>>>>>>>> thanks for the reply. >>>>>>>>> see [1], I change the [Red arrow] key to [ALTGR] then I can easy >>>>>>>>> change the defkeymap.map. make all the red keys work. >>>>>>>>> >>>>>>>>> but for the [Blue Fn] key. I don't know how to make it work in >>>>>>>>> keymap? there is [SHIFT] [CONTROL] [SHIFT] [ALTGR] four modifier >>>>>>>>> keys. all used. so I can not may the [Fn] to those four modifier >>>>>>>>> keys. >>>>>>>>> >>>>>>>>> can I make the leftAlt and rightAlt generate different keys? >>>>>>>>> like: >>>>>>>>> LeftAlt + 'U' = Alt + 'U' >>>>>>>>> RightAlt + 'U' = '7' >>>>>>>> Keyboard driver supports 9 modifiers total, you should be able use one >>>>>>>> of these for your numeric buttons. >>>>>>> oh. can you give me some tips on the other modifiers. >>>>>>> how to define them? >>>>>>> can I just change the defkeymap.map file? >>>>>>> or I must change the source code? >>>>>> Hi Dmitry I found this[1] in the 'man keymaps', three are 9 modifiers. >>>>>> but the in defkaymap.map, there is alwasy like: >>>>>> >>>>>> control keycode 53 = Delete >>>>>> >>>>>> there is no ctrll in the defkeymap.map. >>>>>> how to implement this? >>>>>> >>>>>> ShiftL + u = U >>>>>> ShiflR + u = 7 >>>>> The same as with AltGr you need to do >>>>> >>>>> keycode XX = CtrlR >>>>> >>>>> and then >>>>> >>>>> keycode YY = u >>>>> shift keycode YY = U >>>>> ctrlr keycode YY = seven >>>> Hi Dmitry >>>> thanks for the reply. I test this, it's not work. >>>> ---------- >>>> $ loadkeys -m defkeymap.map > defkeymap.c && rm defkeymap.o >>>> loadkeys: defkeymap.map:71: adding map 64 violates explicit keymaps line >>> You need to fix this ^^^^ first. >>> >> the line 71 is the "ctrlr ....", so I think the defkeymap.map not support >> the "ctrlr". >> > > Please look at the very beginning of the file where there is "keymaps" > statement - you need to enable keymap 64. > Hi Dmitry. very thanks. it's work now. I need work hard in learn English :-) -- Xiangfu Liu Email: xiangfu at qi-hardware dot com Web: http://www.qi-hardware.com ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Fn + [KEYS] question 2009-09-18 6:45 ` Xiangfu Liu @ 2009-09-18 6:49 ` Dmitry Torokhov 0 siblings, 0 replies; 13+ messages in thread From: Dmitry Torokhov @ 2009-09-18 6:49 UTC (permalink / raw) To: Xiangfu Liu; +Cc: linux-input On Fri, Sep 18, 2009 at 02:45:21PM +0800, Xiangfu Liu wrote: > Dmitry Torokhov wrote: > > On Thu, Sep 17, 2009 at 10:31:56AM +0800, Xiangfu Liu wrote: > >> Dmitry Torokhov wrote: > >>> On Wednesday 16 September 2009 10:24:25 am Xiangfu Liu wrote: > >>>> Dmitry Torokhov wrote: > >>>>> On Wed, Sep 16, 2009 at 10:44:01PM +0800, Xiangfu Liu wrote: > >>>>>> Xiangfu Liu wrote: > >>>>>>> Hi Dmitry > >>>>>>> > >>>>>>>>> thanks for the reply. > >>>>>>>>> see [1], I change the [Red arrow] key to [ALTGR] then I can easy > >>>>>>>>> change the defkeymap.map. make all the red keys work. > >>>>>>>>> > >>>>>>>>> but for the [Blue Fn] key. I don't know how to make it work in > >>>>>>>>> keymap? there is [SHIFT] [CONTROL] [SHIFT] [ALTGR] four modifier > >>>>>>>>> keys. all used. so I can not may the [Fn] to those four modifier > >>>>>>>>> keys. > >>>>>>>>> > >>>>>>>>> can I make the leftAlt and rightAlt generate different keys? > >>>>>>>>> like: > >>>>>>>>> LeftAlt + 'U' = Alt + 'U' > >>>>>>>>> RightAlt + 'U' = '7' > >>>>>>>> Keyboard driver supports 9 modifiers total, you should be able use one > >>>>>>>> of these for your numeric buttons. > >>>>>>> oh. can you give me some tips on the other modifiers. > >>>>>>> how to define them? > >>>>>>> can I just change the defkeymap.map file? > >>>>>>> or I must change the source code? > >>>>>> Hi Dmitry I found this[1] in the 'man keymaps', three are 9 modifiers. > >>>>>> but the in defkaymap.map, there is alwasy like: > >>>>>> > >>>>>> control keycode 53 = Delete > >>>>>> > >>>>>> there is no ctrll in the defkeymap.map. > >>>>>> how to implement this? > >>>>>> > >>>>>> ShiftL + u = U > >>>>>> ShiflR + u = 7 > >>>>> The same as with AltGr you need to do > >>>>> > >>>>> keycode XX = CtrlR > >>>>> > >>>>> and then > >>>>> > >>>>> keycode YY = u > >>>>> shift keycode YY = U > >>>>> ctrlr keycode YY = seven > >>>> Hi Dmitry > >>>> thanks for the reply. I test this, it's not work. > >>>> ---------- > >>>> $ loadkeys -m defkeymap.map > defkeymap.c && rm defkeymap.o > >>>> loadkeys: defkeymap.map:71: adding map 64 violates explicit keymaps line > >>> You need to fix this ^^^^ first. > >>> > >> the line 71 is the "ctrlr ....", so I think the defkeymap.map not support > >> the "ctrlr". > >> > > > > Please look at the very beginning of the file where there is "keymaps" > > statement - you need to enable keymap 64. > > > Hi Dmitry. > very thanks. it's work now. Great! I am glad to hear you were able to work this out. -- Dmitry ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2009-09-18 6:49 UTC | newest] Thread overview: 13+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-09-16 7:24 Fn + [KEYS] question Xiangfu Liu 2009-09-16 7:32 ` Dmitry Torokhov 2009-09-16 7:43 ` Xiangfu Liu 2009-09-16 8:06 ` Dmitry Torokhov 2009-09-16 9:25 ` Xiangfu Liu 2009-09-16 14:44 ` Xiangfu Liu 2009-09-16 16:33 ` Dmitry Torokhov 2009-09-16 17:24 ` Xiangfu Liu 2009-09-16 17:40 ` Dmitry Torokhov 2009-09-17 2:31 ` Xiangfu Liu 2009-09-18 5:45 ` Dmitry Torokhov 2009-09-18 6:45 ` Xiangfu Liu 2009-09-18 6:49 ` Dmitry Torokhov
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).