From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: bvraghav@iitk.ac.in (B.V. Raghav) Newsgroups: gmane.emacs.help Subject: Re: How to change the keyboard mapping? Date: Sat, 13 Aug 2016 19:46:45 +0530 Organization: Indian Institute of Technology, Kanpur Message-ID: <87mvkg21pu.fsf@ram.bvr.dp.lan> References: <87r39t3afa.fsf@skimble.plus.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1471103920 4498 195.159.176.226 (13 Aug 2016 15:58:40 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 13 Aug 2016 15:58:40 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) Cc: help-emacs To: Sharon Kimble Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Aug 13 17:58:36 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bYbKW-0000zh-45 for geh-help-gnu-emacs@m.gmane.org; Sat, 13 Aug 2016 17:58:36 +0200 Original-Received: from localhost ([::1]:57690 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bYbKT-0008Dz-7i for geh-help-gnu-emacs@m.gmane.org; Sat, 13 Aug 2016 11:58:33 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40113) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bYZkI-0007gy-0H for help-gnu-emacs@gnu.org; Sat, 13 Aug 2016 10:17:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bYZkD-0002WV-Ht for help-gnu-emacs@gnu.org; Sat, 13 Aug 2016 10:17:04 -0400 Original-Received: from mail2.iitk.ac.in ([202.3.77.186]:56415) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bYZkD-0002WJ-4a for help-gnu-emacs@gnu.org; Sat, 13 Aug 2016 10:17:01 -0400 Original-Received: from smtp.cc.iitk.ac.in (smtp.cc.iitk.ac.in [172.31.1.22]) by mail2.iitk.ac.in (Postfix) with ESMTP id 11646100018F; Sat, 13 Aug 2016 19:46:46 +0530 (IST) Original-Received: from ram.bvr.dp.lan.iitk.ac.in (unknown [172.20.240.119]) (Authenticated sender: bvraghav) by smtp.cc.iitk.ac.in (Postfix) with ESMTPA id 11A0A48; Sat, 13 Aug 2016 19:46:46 +0530 (IST) In-Reply-To: <87r39t3afa.fsf@skimble.plus.com> (Sharon Kimble's message of "Fri, 12 Aug 2016 23:11:05 +0100") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 202.3.77.186 X-Mailman-Approved-At: Sat, 13 Aug 2016 11:58:09 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:111131 Archived-At: Hi, > How can I map my alpha-ENTER to be the same as my numerical-ENTER please? I checked for the keycode using xev in my terminal The two enter keys produce this line in their respective output: state 0x0, keycode 36 (keysym 0xff0d, Return), same_screen YES, state 0x0, keycode 104 (keysym 0xff8d, KP_Enter), same_screen YES, `C-h k ' provides the key binding in current mode. Then I run `M-: (local-set-key (kbd "") (lambda () (interactive) (message "KP Enter pressed")))' and press . It works. So I think there are two ways I should proceed 1. Explicitly map to the same command as in the particular mode I am talking about. 2. Or, use Xmodmap to simulate a return globally. I should append into the .Xmodmap file, and invoke it in the .xinitrc keycode 104 = Return For more details on xmodmap, `M-x man RET xmodmap RET', and https://wiki.archlinux.org/index.php/xmodmap There should be more elegant ways to do the job, but this is FWIW. HTH r -- (B.V. Raghav) Ph.D. Student, Design Programme, IIT Kanpur Ph: +91-9450988137 Email: bvraghav@gmail.com