Ticket #2885 (closed defect: duplicate)

Opened 12 years ago

Last modified 7 years ago

mc handles Shift+Fxx-keys incorrectly on OSX

Reported by: metalim Owned by:
Priority: major Milestone:
Component: mc-tty Version: 4.8.4
Keywords: Cc:
Blocked By: Blocking:
Branch state: no branch Votes for changeset:

Description

All Shift+Fxx combinations are shifted right by 2 keys: Shift+F4 function called from Shift+F6, Shift+F6 function - from Shift+F8, etc.

Pressing F6 - Move dialog is open - correct
Pressing Shift+F6 - New File is opened for editing (function of Shift+F4) - incorrect.

OSX 10.8.1
$ brew doctor
Your system is raring to brew.
$ brew --version
0.9.3
$ mc --version
GNU Midnight Commander 4.8.4

Closed issue on brew tracker: https://github.com/mxcl/homebrew/issues/14590

Change History

comment:1 Changed 12 years ago by andrew_b

Looks like duplicate of #367.

comment:2 Changed 12 years ago by metalim

Could you cooperate with brew team to fix the issue?

comment:3 Changed 12 years ago by metalim

Checking mc formula I see following:

depends_on 'pkg-config' => :build
depends_on 'glib'
depends_on 's-lang'

comment:4 Changed 12 years ago by andrew_b

What is the previous version of mc where shift-fx keys work correctly for you?

comment:5 Changed 12 years ago by metalim

None I can remember.
It was like that for at least a year. Before that I had no mac.

comment:6 Changed 12 years ago by andrew_b

I think, you should consult with Egmont Koblinger (egmont at gmail dot com). Не is Mac user (for example, #2689) and it looks he don't have this problem.

comment:7 Changed 12 years ago by angel_il

Are you use xterm?

comment:8 Changed 12 years ago by metalim

I use regular Terminal application.
declare -x TERM="xterm-256color"
declare -x TERM_PROGRAM="Apple_Terminal"
declare -x TERM_PROGRAM_VERSION="309"

comment:9 Changed 12 years ago by slavazanko

  • Cc egmont added

comment:10 Changed 12 years ago by egmont

  • Cc egmont removed

Sorry but I no longer have access to Mac :(

comment:11 Changed 12 years ago by angel_il

so...
1) in your "regular Terminal application" run 'cat'
2) press F6, S-F6, F4, S-F4, you must see:

^[[17~    (F6)
^[[17;2~  (Shift-F6)
^[OS      (F4)
^[[1;2S   (Shift-F4)

if you see something else - you need 'Learn keys'.

comment:12 Changed 12 years ago by metalim

$ cat
F4: [OS
Shift-F4: *beeps* - doesn't print

F5: [[15~
Shift-F5:
[[25~

F6: [[17~
Shift-F6:
[[26~

"Learn keys" does not allow to bind Shift-F1..F4 keys, as they just beep instead.
Binding Shift-F5..F10 to F15..F20- works fine.

comment:13 follow-up: ↓ 17 Changed 12 years ago by metalim

Found out why.
In Terminal preferences there is default binding of most non-character keys.
Shift-F5..F12 are bound to \033[25..34. And Shift-F1..F4 are not bound at all.

comment:14 Changed 12 years ago by angel_il

try xterm

comment:15 Changed 12 years ago by metalim

comment:16 Changed 12 years ago by dickey

The CNET article says that OS X will redirect you to the XQuartz project.
Not exactly "dropped". For the rest, I'll not use Wikipedia as a source
of information.

comment:17 in reply to: ↑ 13 Changed 12 years ago by dickey

Replying to metalim:

Found out why.
In Terminal preferences there is default binding of most non-character keys.
Shift-F5..F12 are bound to \033[25..34. And Shift-F1..F4 are not bound at all.

I've got Leopard and Mountain Lion - Terminal's behavior here doesn't seem to have
changed noticeably (it's always been partial).

In ncurses, the terminfo entry for Terminal has been one of the "nsterm" flavors.
Comparing nsterm-256color versus xterm-256color, infocmp produces 115 lines of
difference. Not close. It would be nice if Apple chose to document their work.

Version 1, edited 12 years ago by dickey (previous) (next) (diff)

comment:18 Changed 7 years ago by andrew_b

  • Status changed from new to closed
  • Component changed from mc-key-bindings to mc-tty
  • Resolution set to duplicate
  • Milestone Future Releases deleted

Closed as duplicate of #3254.

Note: See TracTickets for help on using tickets.