all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Emanuel Berg <embe8573@student.uu.se>
To: help-gnu-emacs@gnu.org
Subject: Re: translating numpad keys in linux terminal
Date: Fri, 03 Apr 2015 02:48:42 +0200	[thread overview]
Message-ID: <87iodeujdh.fsf@debian.uxu> (raw)
In-Reply-To: mailman.3207.1428018356.31049.help-gnu-emacs@gnu.org

Richard Wordingham <richard.wordingham@ntlworld.com>
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


  parent reply	other threads:[~2015-04-03  0:48 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.3029.1427728348.31049.help-gnu-emacs@gnu.org>
2015-04-01 23:46 ` translating numpad keys in linux terminal Dan Espen
2015-04-02 10:49 ` Simon Clubley
2015-04-02 23:10   ` Emanuel Berg
2015-04-02 23:45     ` Richard Wordingham
     [not found]     ` <mailman.3207.1428018356.31049.help-gnu-emacs@gnu.org>
2015-04-03  0:48       ` Emanuel Berg [this message]
2015-04-03  1:23         ` Emanuel Berg
2015-04-03  1:25         ` Dan Espen
2015-04-03  1:46           ` Emanuel Berg
2015-04-03  2:56             ` Tim Johnson
     [not found]             ` <mailman.3215.1428029828.31049.help-gnu-emacs@gnu.org>
2015-04-03  3:38               ` Dan Espen
2015-04-03 13:35     ` Simon Clubley
2015-04-05 23:39       ` Emanuel Berg
2015-03-30 15:12 Tim Johnson
2015-04-01 10:08 ` Michael Heerdegen
     [not found] ` <mailman.3119.1427882930.31049.help-gnu-emacs@gnu.org>
2015-04-01 14:33   ` Pascal J. Bourguignon
2015-04-01 15:37     ` Tim Johnson
     [not found]     ` <mailman.3140.1427902682.31049.help-gnu-emacs@gnu.org>
2015-04-01 16:28       ` Pascal J. Bourguignon
2015-04-01 18:57         ` Tim Johnson
2015-04-01 23:23     ` Emanuel Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87iodeujdh.fsf@debian.uxu \
    --to=embe8573@student.uu.se \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.