Skip to contentSkip to conversation

make the CtrlR and CtrlL modifier output different keys

PATCH Xiangfu Liu 2 participants 3 messages Sep 18, 2009

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

Hi.

I want make the CtrlR and CtrlL output different keys. like:

CtrlR + U = 7
CtrlR + U = Control + U.

so I modify the keyboard.c code. attach is the code.

give me some feedback about this patch.
thanks.

Signature · 3 lines
Xiangfu Liu
Email: xiangfu at qi-hardware dot com
Web: http://www.qi-hardware.com
arch/mips/jz4740/platform.c +3 -3
index 5859589..ddd7d3f 100644
@@ -242,11 +242,11 @@ static struct platform_device jz_nand_device = {
  * don't define this. the keyboard and keyboard both work
  */
 
-#define KEY_QI_QI		KEY_F13
-#define KEY_QI_UPRED	KEY_RIGHTCTRL
+#define KEY_QI_QI	KEY_RIGHTCTRL
+#define KEY_QI_UPRED	KEY_RIGHTSHIFT
 #define KEY_QI_VOLUP	KEY_F15
 #define KEY_QI_VOLDOWN	KEY_F16
-#define KEY_QI_FN	KEY_F17
+#define KEY_QI_FN	KEY_RIGHTCTRL
 
 static const uint32_t qi_lb60_keymap[] = {
 	KEY(0, 0, KEY_F1),	/* S2 */
drivers/char/defkeymap.map +4 -4
index 25d05b4..497cfc2 100644
@@ -113,9 +113,9 @@ keycode  43 = backslash        bar
 	control keycode  43 = Control_backslash
 	alt     keycode  43 = Meta_backslash  
 keycode  44 = z               
-	altgr   keycode  43 = nine
+	altgr   keycode  44 = nine
 keycode  45 = x               
-	altgr   keycode  43 = zero
+	altgr   keycode  45 = zero
 keycode  46 = c
 	altgr   keycode  46 = Hex_C   
 keycode  47 = v               
@@ -133,7 +133,7 @@ keycode  52 = period           greater
 keycode  53 = slash            question        
 	control keycode  53 = Delete          
 	alt     keycode  53 = Meta_slash      
-keycode  54 = Shift           
+keycode  54 = AltGr
 keycode  55 = KP_Multiply     
 keycode  56 = Alt             
 keycode  57 = space            space           
@@ -240,7 +240,7 @@ keycode  93 =
 keycode  94 =
 keycode  95 =
 keycode  96 = KP_Enter        
-keycode  97 = AltGr
+keycode  97 = Control
 keycode  98 = KP_Divide       
 keycode  99 = Control_backslash
 	control keycode  99 = Control_backslash
drivers/char/keyboard.c +58 -0

76 lines not on this page · raw message

#1 lore raw
Quoted 5 lines · Xiangfu Liu

Hi.

I want make the CtrlR and CtrlL output different keys. like:

Quoted 7 lines

CtrlR + U = 7
CtrlR + U = Control + U.

so I modify the keyboard.c code. attach is the code.

give me some feedback about this patch.
thanks.

You should be able to do what you want by loading proper keymap; no need to adjust the keyboard code (especially in a way that does not make sense for other devices).

Signature · 5 lines
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#2 lore raw
Quoted 9 lines · Dmitry Torokhov
Quoted 8 lines · Xiangfu Liu

Hi.

I want make the CtrlR and CtrlL output different keys. like:

CtrlR + U = 7
CtrlR + U = Control + U.

Quoted 9 lines
Quoted 4 lines

so I modify the keyboard.c code. attach is the code.

give me some feedback about this patch.
thanks.

You should be able to do what you want by loading proper keymap; no need to adjust the keyboard code (especially in a way that does not make sense for other devices).

yes. I saw your last email. it's work on. I revert the code in our kernel repos. thanks again.

Best Regards

Signature · 7 lines
Xiangfu Liu
Email: xiangfu at qi-hardware dot com
Web: http://www.qi-hardware.com
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html