From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.help Subject: Re: translating numpad keys in linux terminal Date: Fri, 03 Apr 2015 02:48:42 +0200 Organization: Aioe.org NNTP Server Message-ID: <87iodeujdh.fsf@debian.uxu> References: <87k2xu5doo.fsf@debian.uxu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1428021929 25532 80.91.229.3 (3 Apr 2015 00:45:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 3 Apr 2015 00:45:29 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Apr 03 02:45:22 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Ydpjd-0005k8-5r for geh-help-gnu-emacs@m.gmane.org; Fri, 03 Apr 2015 02:45:21 +0200 Original-Received: from localhost ([::1]:60541 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ydpjc-0000VK-GJ for geh-help-gnu-emacs@m.gmane.org; Thu, 02 Apr 2015 20:45:20 -0400 Original-Path: usenet.stanford.edu!news.kjsl.com!feeder.erje.net!eu.feeder.erje.net!news.etla.org!aioe.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 61 Original-NNTP-Posting-Host: feB02bRejf23rfBm51Mt7Q.user.speranza.aioe.org Original-X-Complaints-To: abuse@aioe.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) X-Notice: Filtered by postfilter v. 0.8.2 Cancel-Lock: sha1:+uzLNTRWNfzz/SQ3IxD3ErkB7hg= Mail-Copies-To: never Original-Xref: usenet.stanford.edu gnu.emacs.help:211237 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 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-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:103519 Archived-At: Richard Wordingham writes: > When I run xev on Ubuntu 12.04 in a gnome-terminal > and then select the original terminal, xev reports > nothing when I hit keypad keys. Some keys generate > sequences that are echoed to the terminal. This is > the root of the problem. Emacs does not get > keystrokes directly from X; instead they are > mediated by the terminal emulator, gnome-terminal in > my case. > > Now, if I click on the window created by xev, keypad > events do get reported. These events have gone to > Xev via the X system; the terminal emulator has not > seen them as directed at it. ... regardless of whatever, with X and xterm and xev (and possibly the uncanny X-Men as well, tho we have to look into that), you *are* able to get output that indicates a distinction between the numerologist keypad and the bender arrow keys, e.g.: keycode 83 (keysym 0xff96, KP_Left) vs. keycode 113 (keysym 0xff51, Left) This tells me, in principle there shouldn't be a problem for 'emacs -nw' to do the same. Why this doesn't happen is thus due to some implementation detail or policy: be it a bug, a coincidence, or a consideration - either in Emacs itself, or in how Emacs is run in the terminal. Perhaps someone in this list that is familiar with just exactly what the '-nw' option does can enlighten us? PS. For me, it works with gnome-terminal as well tho I don't recommend using it all the same. PPS. Here is the entire xev output: KeyRelease event, serial 47, synthetic NO, window 0xa00001, root 0x22d, subw 0x0, time 20703938, (-1,747), root:(0,767), state 0x0, keycode 83 (keysym 0xff96, KP_Left), same_screen YES, XLookupString gives 0 bytes: XFilterEvent returns: False KeyPress event, serial 47, synthetic NO, window 0xa00001, root 0x22d, subw 0x0, time 20704914, (-1,747), root:(0,767), state 0x0, keycode 113 (keysym 0xff51, Left), same_screen YES, XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False -- underground experts united http://user.it.uu.se/~embe8573