Bug 533293 - can't capture the keypad home key
can't capture the keypad home key
Product: Fedora
Classification: Fedora
Component: gnome-terminal (Show other bugs)
x86_64 Linux
low Severity medium
: ---
: ---
Assigned To: Behdad Esfahbod
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2009-11-05 17:25 EST by Frank Cox
Modified: 2010-06-28 11:23 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-06-28 11:23:51 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Frank Cox 2009-11-05 17:25:02 EST
Description of problem:
Running the following code in gnome-terminal on Fedora 11, I get this when I
press 7 on my keypad:

27 33
91 133
49 61
126 176

I can't capture the keypad home key.  If I hit the dedicated home key (between
the keypad and the letter keys, I get this:

Home hit
262 406

So that works.

Running the following code in xterm and at a ASCII (runlevel 3) console, I get this:

Home hit
262 406

Which is better (at least I'm not just getting a raw esc code) but still doesn't provide KEY_A1

I can't get KEY_A1 on either gnome-terminal or xterm.

Same story with the end key.

In short, the 7/home and 1/end keys are somewhat usable from the keypad with xterm and the ASCII console as they become interchangable with the dedicated home and end keys, but from gnome-terminal all you get is a raw esc code.  And KEY_A1 and KEY_C1 never show up at all anywhere with any terminal.

Version-Release number of selected component (if applicable):

How reproducible:
Every time

Steps to Reproduce:
1.Compile and run this:

#include <ncurses.h>
int main(void)
	int ch;
	while (ch !='a')
		printw("Home hit\n");
		printw("A1 hit\n");	
	printw("%d %o\n",ch,ch);
    return 0;        

2. Hit the 7/home key on your keypad.

Actual results:
gnome-terminal gives me this:
27 33
91 133
49 61
126 176

xterm and the ASCII console give me this:
Home hit
262 406

Expected results:
A1 hit
Comment 1 Miroslav Lichvar 2009-11-06 06:00:26 EST
Real keypad keys are not emulated in xterm, the XK_KP_* keys received from X are just remapped to XK_* keys. They are not even defined in terminfo.

It should be possible to make a custom mapping though, see

As for gnome-terminal, this looks like a bug.
Comment 2 Cathryn Mataga 2009-12-20 13:48:47 EST
I'm seeing this same bug also.   Home and End key on the keypad work correctly in ncurses within xterm, but within gnome-terminal they return an escape sequence.  I'm using 'get_wch' instead and I see basically the same problem.

For a quick verify, run 'alsamixer' from gnome-terminal and press the keypad home or end keys, the program exits immediately.  This is because the home/end is treated like an esc key.  Within xterm these keys function correctly.  Also the non-keypad home and end keys function correctly both in xterm and gnome-terminal.
Comment 3 Cathryn Mataga 2009-12-20 13:57:19 EST
And I'm running Fedora 12, not 11, updated to current.
Comment 4 Bug Zapper 2010-04-28 07:06:59 EDT
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '11'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 11's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 11 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
Comment 5 Bug Zapper 2010-06-28 11:23:51 EDT
Fedora 11 changed to end-of-life (EOL) status on 2010-06-25. Fedora 11 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.