bugGNU nano - Bugs: bug #57294, on Debian and derivatives,...


You are not allowed to post comments on this tracker with your current authentication level.

bug #57294: on Debian and derivatives, <Alt+Up> does not work on a Linux console

Submitted by:  Benno Schulenberg <bens>
Submitted on:  Sat 23 Nov 2019 04:41:28 PM UTC  
Severity:  2 - Minor Status:  Confirmed
Assigned to:  None Open/Closed:  Open

( Jump to the original submission)

Wed 11 Dec 2019 02:12:03 PM UTC, comment #12: 

Completely agree with your proposals in the bugreport (actually, just remove all KeyboardSignal would be even saner, people who want it will be able to put it in).
Perhaps somewhere in the docs for nano include a suggestion like:
`sudo dumpkeys |grep -v KeyboardSignal |sudo loadkeys` if people run into this issue.

Peter Passchier <pepa65>
Wed 11 Dec 2019 12:58:48 PM UTC, comment #11: 

Yes, <Alt+Down> works out of the box on the console because key 108 doesn't have any extra assignments by default.  And yes, if you remove all the extra assignments from key 103, then of course <Alt+Up> will work too in nano on the console.  The problem is the default assignment by Debian of KeyboardSignal to the higher levels of key 103 -- an assignment that in my guesstimate will be useless for 99.99 percent of the users.

To undrown the reference to the upstreammed report:

Benno Schulenberg <bens>
Project Administrator
Wed 11 Dec 2019 12:04:09 AM UTC, comment #10: 

OK sorry, on the console, Alt-Up doesn't work out of the box, but Alt-Down does (because alt 108 is not bound to KeyboardSignal). But after a rebound where only 103 is bound and all additional combos are no longer KeyboardSignal, then that works too.

Peter Passchier <pepa65>
Tue 10 Dec 2019 06:09:04 PM UTC, comment #9: 

Ehm...  I'm not talking about a terminal (in other words: a terminal emulator).  I'm specifically talking about a Linux console: the thing you reach by typing Ctrl+Alt+F2, for example.  That is the thing where you can run dumpkeys (on emulators it says it can't get a file decriptor for the console).  In this issue, I'm interested only in nano running on such a console.

If your 'dumpkeys | grep 103' really says "alt keycode 103 = KeyboardSignal", then typing Alt+Up on that console should do nothing (and Alt+Down will do the same as plain Down, which you can see by first typing Up a few times, which goes back in command history).

Benno Schulenberg <bens>
Project Administrator
Tue 10 Dec 2019 02:25:34 PM UTC, comment #8: 

(On another install of Ubuntu MATE 18.04 Alt-Up/Down works, when I ssh into my Ubuntu 16.04 on BananaPi it doesn't respond, but on Debian 9 it does work, On Raspbian 10 it says '"buttonlen" not found' -- so it's a mixed bag...)

Peter Passchier <pepa65>
Tue 10 Dec 2019 01:44:26 PM UTC, comment #7: 

Sorry, I have no explanation why... In the terminal, Alt-Up/Down outputs 'A'/'B', in dte it jumps up & down by a screen, in ne it opens the menu, in geany it also scrolls the viewport, in vi it jumps to the next/previous word (strange: just Up/Down outputs A/B, so Up in command mode jumps to the end of the line and starts append..?!), clex (curses-based file manager) outputs ;3A/;3B, dav-txt as well, tig says 'unknown key', hexcurse outputs 13A/13B.

Not aware of installing anything that would affect it, but I do install things, so it could be a side effect of something. If you want me to try certain things, I'm game to learn more about it.

This is MATE terminal by the way, but running nano in a new Ubuntu MATE install (in virtualbox), Alt-Up/Down both say 'No current search pattern'...

Peter Passchier <pepa65>
Tue 10 Dec 2019 12:01:34 PM UTC, comment #6: 

Your description of Alt+Up is correct: Alt+Up moves the viewport one row up (so all the content plus the cursor move one row down, as long as possible).

But... when "alt keycode 103 = KeyboardSignal", how can Alt+Up do anything in nano on the console?  Did you install a systemd handler that translates 'KeyboardSignal' back to 'Up'?  Does Alt+Up work also (act just like Up) in other programs on the console?  Vim, Emacs, ranger, what have you?

I have tried Alt+Up on a console in Xubuntu 18.04, Kubuntu 19.10, Elementary 5.1, and Linux Mint Sarah, and it doesn't work in any of them.  How then can it work in your Ubuntu 18.04?

Benno Schulenberg <bens>
Project Administrator
Mon 09 Dec 2019 06:50:02 PM UTC, comment #5: 

I don't know what it's supposed to do, but it moves the editor content down the window while keeping the cursor in the same position in the content (ie. moving down with it, until it hits the edge, and then the cursor stays there while the content keeps moving down, until the top of the file is reached).

Alt-Shift-Up/Down selects text half a screen at a time it seems.

Peter Passchier <pepa65>
Mon 09 Dec 2019 06:17:52 PM UTC, comment #4: 

Huh?  Does Alt+Up in nano on your Linux console work?  What does it do?  And what do the Alt+Shift+Up/Down keystrokes do?  (Yes, I know what they ought to do, but please describe what they do for you.)

Benno Schulenberg <bens>
Project Administrator
Mon 09 Dec 2019 04:08:49 PM UTC, comment #3: 

For what it's worth, on Ubuntu 18.04.3:

# dumpkeys | grep "keycode 103"
keycode 103 = Up             
  alt keycode 103 = KeyboardSignal 
  alt shiftl  keycode 103 = KeyboardSignal 
  alt shiftr  keycode 103 = KeyboardSignal 
  alt shiftl  shiftr  keycode 103 = KeyboardSignal 
  alt ctrll keycode 103 = KeyboardSignal 
  alt shiftl  ctrll keycode 103 = KeyboardSignal 
  alt shiftr  ctrll keycode 103 = KeyboardSignal 
  alt shiftl  shiftr  ctrll keycode 103 = KeyboardSignal

# nano somefile
[both Alt-Up and Alt-Down respond, as does Alt-Shift-Up/Down]

Peter Passchier <pepa65>
Sun 08 Dec 2019 01:15:18 PM UTC, comment #2: 

I've reported the issue upstream: https://bugs.debian.org/946392.

Benno Schulenberg <bens>
Project Administrator
Thu 28 Nov 2019 10:24:06 AM UTC, comment #1: 

The user can make the <Alt+Up> keystroke work in nano with the following two commands (executed on a Linux console):

  dumpkeys | grep -v "alt[[:blank:]]keycode 103"  >keylist
  sudo loadkeys  keylist

By default "alt 103" produces KeyboardSignal.  It was hard to find what KeyboardSignal is supposed to do.  According to the two pages linked below, KeyboardSignal would run a command that is listed after "kb:" in the /etc/inittab file.  But that file belongs to sysvinit, and my system uses systemd.  When I create the file anyway and add a kb: line, I cannot get it to execute the listed command -- which makes sense, because the thing is sysvinit-specific and systemd has apparently not implemented it.  So... it seems KeyboardSignal is entirely pointless on a modern, systemd system.  :|


Further, I cannot figure out where 'setupcon -k' (which is run by /lib/console-setup/keyboard-setup.sh, which is run by systemd on startup) gets its default keymap from...  Ah, no!  It runs /etc/console-setup/cached_setup_keyboard.sh instead, when it exists, and it does exist on my system.  But who creates this file, and who creates the cached keymap that it loads?  Pfff...

Benno Schulenberg <bens>
Project Administrator
Sat 23 Nov 2019 04:41:28 PM UTC, original submission:  

To see what I mean, boot into some flavor of Ubuntu or Linux Mint, switch to a VT (with <Ctrl+Alt+F2>, for example), log in, and run nano with some text file as argument.  First use <Alt+Down> to scroll down a few lines.  Then try using <Alt+Up> to scroll back up -- it doesn't work.  On my Manjaro system it works fine.

Of course: this is not a bug in nano, but it is annoying.

Benno Schulenberg <bens>
Project Administrator


No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by pepa65 (Posted a comment)
  • -email is unavailable- added by bens (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-12-08 bens Severity3 - Normal => 2 - Minor
        StatusNone => Confirmed
        Summaryon Ubuntu and derivatives, <Alt+Up> does not work on a Linux console => on Debian and derivatives, <Alt+Up> does not work on a Linux console

    Back to the top

    Powered by Savane 3.6