From owner-freebsd-questions@FreeBSD.ORG Sun May 29 11:56:40 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1C4C416A41C for ; Sun, 29 May 2005 11:56:40 +0000 (GMT) (envelope-from ulfma629@student.liu.se) Received: from lemuria.unit.liu.se (lemuria.unit.liu.se [130.236.230.146]) by mx1.FreeBSD.org (Postfix) with ESMTP id B2C4643D1D for ; Sun, 29 May 2005 11:56:38 +0000 (GMT) (envelope-from ulfma629@student.liu.se) Received: by lemuria.unit.liu.se (Postfix, from userid 104) id D5A65F42E; Sun, 29 May 2005 13:56:37 +0200 (MEST) Received: from liu.se (avalon.unit.liu.se [130.236.230.138]) by lemuria.unit.liu.se (Postfix) with ESMTP id A5C91F412 for ; Sun, 29 May 2005 13:56:33 +0200 (MEST) Received: from [81.94.82.239] by qom.unit.liu.se (mshttpd); Sun, 29 May 2005 13:56:33 +0200 From: Ulf Magnusson To: freebsd-questions@freebsd.org Message-ID: Date: Sun, 29 May 2005 13:56:33 +0200 X-Mailer: iPlanet Messenger Express 5.2 HotFix 2.05 (built Mar 3 2005) MIME-Version: 1.0 Content-Language: en X-Accept-Language: en Priority: normal Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 3.0.2-liu_20050119_1740 (2004-11-16) on themis.unit.liu.se X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=FROM_ENDS_IN_NUMS, LIU_FROM_MATCHES_LIUSTUDENT autolearn=disabled version=3.0.2-liu_20050119_1740 Subject: Swapping Menu and Ctrl in xorg X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 May 2005 11:56:40 -0000 I'm trying to swap the left control key for the Menu key on my Windows keyboard. I'm using the "se" symbol map, residing in the {xkb-base}/symbols/pc/ directory. I took a first stab at the problem by modifying the /symbols/pc/pc file (I have no idea why it gets used, as it isn't included directly or indirectly from the "se" file, but a quick grep led me there), changing the key { [ Menu ] }; entry to key { [ Control_L ] }; and moving it before the line modifier_map Control{ Control_L, Control_R }; . After that the key would generate the correct keysym, but wouldn't function as a control key. I noticed that xev reported "state 0x0" for the wanna-be-ctrl Menu key and "state 0x4" for the real, working ctrl. I took a second stab at the problem with the following xmodmap script: # 117 is the scan code for my Menu key keysym 117 = Control_L add Control = Control_L That seemed to do the trick at first, but after a while I noticed that my U key would no longer function, for some wierd reason generating the keysym Control_L. Is this a bug in xmodmap? I'm running out of ideas. What's the good way to swap the two keys? Ulf X Window System Version 6.8.2 Release Date: 9 February 2005 X Protocol Version 11, Revision 0, Release 6.8.2 Build Operating System: FreeBSD 5.4 i386 [ELF] Current Operating System: FreeBSD obygden 5.4-RELEASE FreeBSD 5.4-RELEASE #0: Wed May 11 17:32:06 CEST 2005 ulf at obygden:/usr/obj/usr/src/sys/DEB i386 Build Date: 21 May 2005 Before reporting problems, check http://wiki.X.Org to make sure that you have the latest version. Module Loader present