Ticket #367 (closed defect: worksforme)

Opened 15 years ago

Last modified 3 months ago

shifted function key mapping broken with ncurses

Reported by: ossi Owned by:
Priority: minor Milestone:
Component: mc-tty Version: 4.6.2
Keywords: Cc:
Blocked By: Blocking:
Branch state: no branch Votes for changeset:

Description

when mc is compiled with ncurses instead of slang, function keys modified with shift are mapped to f13 and so on instead of f11 and so on. this breaks the layout which is reliant on the physical locations of the keys.

Change History

comment:1 Changed 15 years ago by styx

  • Milestone set to future releases

comment:2 Changed 15 years ago by dickey

Actually the problem is unlikely to be the library.
It is likely that slang is picking up a termcap entry,
which differs from the terminal descriptions maintained
by ncurses. (There's no details in the report on which
$TERM and corresponding entry is being used).

comment:3 Changed 15 years ago by ossi

it's the same behavior in xterm and on the linux console.

comment:4 Changed 15 years ago by slavazanko

  • Blocked By 386 added

After applying patch from #386 need to check reaction on specified functional keys under ncurses

comment:5 Changed 15 years ago by slavazanko

  • Blocked By 386 removed

comment:6 Changed 15 years ago by slavazanko

  • Blocked By 386 added

comment:5 Changed 15 years ago by slavazanko

  • Blocked By 347 added

comment:6 Changed 15 years ago by slavazanko

  • Blocked By 347 removed

comment:7 Changed 15 years ago by slavazanko

  • Blocked By 386 removed

comment:10 Changed 15 years ago by ossi

it works now in both xterm and konsole, but it is consistently failing on the linux console (now irrespective of slang or ncurses use). i think the root cause is now the inconsistent mapping of the shifted function keys by the kernel keymaps. given that this is likely to be a common problem, introducing a setting (which would be specific to the host the login comes from - see "who" output) might be necessary.

comment:11 Changed 15 years ago by andrew_b

  • Status changed from new to closed
  • Resolution set to worksforme
  • severity set to no branch
  • Milestone future releases deleted

I cannot reproduce in current master.
Well, I close this ticket.

comment:12 Changed 10 years ago by ossi

  • Branch state set to no branch

for completeness:

the problem can be fixed at its root by fixing the kernel keymap (obviously).

if you are using the modern console-setup (debian package name; binary is named setupcon), append this to your /etc/console-setup/remap.inc:

# make shift-Fx sane
shift keycode 59 = F11
shift keycode 60 = F12
shift keycode 61 = F13
shift keycode 62 = F14
shift keycode 63 = F15
shift keycode 64 = F16
shift keycode 65 = F17
shift keycode 66 = F18
shift keycode 67 = F19
shift keycode 68 = F20
shift keycode 87 = F21
shift keycode 88 = F22

if you are using the obsolete console-data (debian package name) with the kbd package, append this to your /etc/kbd/remap:

# make shift-Fx sane
s/keycode  59 = F1 \+F13 \+Console_13 \+F25 /keycode 59 = F1 F11 Console_13 F21 /;
s/keycode  60 = F2 \+F14 \+Console_14 \+F26 /keycode 60 = F2 F12 Console_14 F22 /;
s/keycode  61 = F3 \+F15 \+Console_15 \+F27 /keycode 61 = F3 F13 Console_15 F23 /;
s/keycode  62 = F4 \+F16 \+Console_16 \+F28 /keycode 62 = F4 F14 Console_16 F24 /;
s/keycode  63 = F5 \+F17 \+Console_17 \+F29 /keycode 63 = F5 F15 Console_17 F25 /;
s/keycode  64 = F6 \+F18 \+Console_18 \+F30 /keycode 64 = F6 F16 Console_18 F26 /;
s/keycode  65 = F7 \+F19 \+Console_19 \+F31 /keycode 65 = F7 F17 Console_19 F27 /;
s/keycode  66 = F8 \+F20 \+Console_20 \+F32 /keycode 66 = F8 F18 Console_20 F28 /;
s/keycode  67 = F9 \+F21 \+Console_21 \+F33 /keycode 67 = F9 F19 Console_21 F29 /;
s/keycode  68 = F10 \+F22 \+Console_22 \+F34 /keycode 68 = F10 F20 Console_22 F30 /;
s/keycode  87 = F11 \+F23 \+Console_23 \+F35 /keycode 87 = F11 F21 Console_23 F31 /;
s/keycode  88 = F12 \+F24 \+Console_24 \+F36 /keycode 88 = F12 F22 Console_24 F32 /;

i actually copied that from /etc/console-common/remap (iirc), which was coming from the older package named console-tools.

(i also created http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=734164 to clear up some of the confusion surrounding these packages ...)

comment:13 Changed 3 months ago by andrew_b

  • Component changed from mc-core to mc-tty
Note: See TracTickets for help on using tickets.