LINUX.ORG.RU

Не могу настроить горячие клавиши

 


0

2

Переназначил стрелки, через xkb, в системе (arch) на сочетания клавиш, как в emacs. т.е. при нажатии ctrl+n приходит Down, при нажатии ctrl+f, приходит Right и.т.д.

Самое странное, что все программы с гуи и терминал замечательно работают, а вот mc считает, что при нажатии ctrl+n приходит ctrl+down и.т.д

Повидимому, это проблема исключительно mc. По этому решил изменить hotkey в конфиге mc, а точнее /etc/mc/mc.keymap добавил везде, где только можно соответствующие (ctrl-down/up/left/right).

По большей части все заработало, за исключением навигации по меню (F9). Видимо mc использует какой-то другой, возможно более старый метод получения кода клавиши, или что-то (в xkb) настроил не так.

xev при нажатии и отпускани ctrl+n выдает:

KeyPress event, serial 34, synthetic NO, window 0x1e00001,
    root 0xae, subw 0x0, time 8998945, (91,426), root:(778,450),
    state 0x0, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyPress event, serial 34, synthetic NO, window 0x1e00001,
    root 0xae, subw 0x0, time 9001175, (91,426), root:(778,450),
    state 0x0, keycode 116 (keysym 0xff54, Down), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 34, synthetic NO, window 0x1e00001,
    root 0xae, subw 0x0, time 9001261, (91,426), root:(778,450),
    state 0x0, keycode 116 (keysym 0xff54, Down), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 34, synthetic NO, window 0x1e00001,
    root 0xae, subw 0x0, time 9001670, (91,426), root:(778,450),
    state 0x84, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

Прошу знающих людей прояснить ситуацию, почему так происходит?

Ищу способ заставить работать навигацию по меню. Что в этом случае можно предпринять?

В идеале хотелось бы избавиться от выше описанных костылей (ctrl-d -> ctrl-down ...), но это не столь принципиально.

Мой конфиг:

[main]
ChangePanel = tab
Help = f1
UserMenu = f2
View = f3
# ViewFile =
Edit = f4
# EditForceInternal =
Copy = f5
Move = f6
MakeDir = f7
Delete = f8
Menu = f9
Quit = f10
MenuLastSelected = f19
QuitQuiet = f20
Find = alt-question
CdQuick = alt-c
HotList = ctrl-backslash
Reread = ctrl-r
DirSize = ctrl-space
Suspend = ctrl-z
Swap = ctrl-u
History = alt-h
# PanelListing =
# SetupListingFormat =
ShowHidden = alt-dot
SplitVertHoriz = alt-comma
SplitEqual = alt-equal
SplitMore = alt-shift-right
SplitLess = alt-shift-left
Shell = ctrl-o
PutCurrentPath = alt-a
PutOtherPath = alt-shift-a
PutCurrentSelected = alt-enter; ctrl-enter
PutCurrentFullSelected = ctrl-shift-enter
ViewFiltered = alt-exclamation
Select = kpplus
Unselect = kpminus
SelectInvert = kpasterisk
ScreenList = alt-prime
# OptionsLayout =
# OptionsAppearance =
# OptionsPanel =
# OptionsConfirm =
# OptionsDisplayBits =
# OptionsVfs =
# LearnKeys =
# SaveSetup =
# EditExtensionsFile =
# EditFileHighlightFile =
# Filter =
# ConnectFish =
# ConnectFtp =
# ConnectSmb =
# Undelete =
ExtendedKeyMap = ctrl-x

[main:xmap]
ChangeMode = c
ChangeOwn = o
CompareDirs = d
CompareFiles = ctrl-d
HotListAdd = h
LinkSymbolicEdit = ctrl-s
Link = l
LinkSymbolic = s
LinkSymbolicRelative = v
PanelInfo = i
PanelQuickView = q
ExternalPanelize = exclamation
VfsList = a
Jobs = j
PutCurrentPath = p
PutOtherPath = ctrl-p
PutCurrentTagged = t
PutOtherTagged = ctrl-t
PutCurrentLink = r
PutOtherLink = ctrl-r

[panel]
CycleListingFormat = alt-t
Search = ctrl-s; alt-s
Mark = insert; ctrl-t
MarkUp = shift-up
MarkDown = shift-down
# MarkLeft =
# MarkRight =
Down = down; ctrl-n; ctrl-down
Up = up; ctrl-p; ctrl-up
Left = left; ctrl-left
Right = right; ctrl-right
PageUp = pgup; alt-v
PageDown = pgdn; ctrl-v
Enter = enter
PanelOtherCd = alt-o
PanelOtherCdLink = alt-l
ViewRaw = f13
EditNew = f14
CopySingle = f15
MoveSingle = f16
DeleteSingle = f18
# SelectExt =
Select = alt-plus
Unselect = alt-minus
SelectInvert = alt-asterisk
CdChild = ctrl-pgdn
CdParent = ctrl-pgup
# CdParentSmart =
# Panelize =
History = alt-shift-h
HistoryNext = alt-u
HistoryPrev = alt-y
BottomOnScreen = alt-j
MiddleOnScreen = alt-r
TopOnScreen = alt-g
PanelOtherSync = alt-i
SelectCodepage = alt-e
Top = alt-lt; home; a1
Bottom = alt-gt; end; c1
# Sort =
# SortPrev =
# SortNext =
# SortReverse =
# SortByName =
# SortByExt =
# SortBySize =
# SortByMTime =
# ScrollLeft =
# ScrollRight =

[dialog]
Ok = enter
Cancel = f10; esc; ctrl-g
Up = left; up; ctrl-up
Left = left; up; ctrl-left
Down = right; down; ctrl-down
Right = right; down; ctrl-right
Help = f1
Suspend = ctrl-z
Refresh = ctrl-l
ScreenList = alt-prime
ScreenNext = alt-rbrace
ScreenPrev = alt-lbrace

[input]
Home = ctrl-a; alt-lt; home; a1
End = ctrl-e; alt-gt; end; c1
Left = left; alt-left; ctrl-b; ctrl-left
Right = right; alt-right; ctrl-f; ctrl-right
#WordLeft = ctrl-left; alt-b
#WordRight = ctrl-right; alt-f
Backspace = backspace; ctrl-h
Delete = delete; ctrl-d
DeleteToWordBegin = alt-backspace
DeleteToWordEnd = alt-d
# Mark =
Remove = ctrl-w
# Cut =
Store = alt-w
# Paste =
Yank = ctrl-y
DeleteToEnd = ctrl-k
#HistoryPrev = alt-p; ctrl-down
#HistoryNext = alt-n; ctrl-up
HistoryPrev = alt-p
HistoryNext = alt-n
History = alt-h
Complete = alt-tab
# Clear =
MarkLeft = shift-left
MarkRight = shift-right
MarkToWordBegin = ctrl-shift-left
MarkToWordEnd = ctrl-shift-right
MarkToHome = shift-home
MarkToEnd = shift-end

[listbox]
Up = up; ctrl-p; ctrl-up
Down = down; ctrl-n; ctrl-down
Top = home; alt-lt; a1
Bottom = end; alt-gt; c1
PageUp = pgup; alt-v
PageDown = pgdn; ctrl-v
Delete = delete; d
Clear = shift-delete; shift-d

[tree]
Help = f1
Reread = f2; ctrl-r
Forget = f3
ToggleNavigation = f4
Copy = f5
Move = f6
Up = up; ctrl-p; ctrl-up
Down = down; ctrl-n; ctrl-down
Left = left; ctrl-left
Right = right; ctrl-right
Top = home; alt-lt; a1
Bottom = end; alt-gt; c1
PageUp = pgup; alt-v
PageDown = pgdn; ctrl-v
Enter = enter
Search = ctrl-s; alt-s
Delete = f8; delete

[help]
Help = f1
Index = f2; c
Back = f3; left; l
Quit = f10; esc
Up = up; ctrl-p; ctrl-up
Down = down; ctrl-n; ctrl-down
PageDown = f; space; pgdn; ctrl-v
PageUp = b; pgup; alt-v; backspace
HalfPageDown = d
HalfPageUp = u
Top = home; ctrl-home; ctrl-pgup; a1; alt-lt; g
Bottom = end; ctrl-end; ctrl-pgdn; c1; alt-gt; shift-g
Enter = right; enter
LinkNext = tab
LinkPrev = alt-tab
NodeNext = n
NodePrev = p

[editor]
Store = ctrl-insert
Paste = shift-insert
Cut = shift-delete
Up = up; ctrl-up
Down = down; ctrl-down
Left = left; ctrl-left
Right = right; ctrl-right
#WordLeft = ctrl-left; ctrl-z
#WordRight = ctrl-right; ctrl-x
Enter = enter
Return = shift-enter; ctrl-enter; ctrl-shift-enter
BackSpace = backspace; ctrl-h
Delete = delete; ctrl-d
PageUp = pgup
PageDown = pgdn
Home = home
End = end
Tab = tab; shift-tab; ctrl-tab; ctrl-shift-tab
Undo = ctrl-u
Redo = alt-r
Top = ctrl-home; alt-lt
Bottom = ctrl-end; alt-gt
#ScrollUp = ctrl-up
#ScrollDown = ctrl-down
TopOnScreen = ctrl-pgup
BottomOnScreen = ctrl-pgdn
DeleteToWordBegin = alt-backspace
DeleteToWordEnd = alt-d
DeleteLine = ctrl-y
DeleteToEnd = ctrl-k
# DeleteToHome =
# ParagraphUp =
# ParagraphDown =
Save = f2
# EditFile =
EditNew = ctrl-n
SaveAs = f12; ctrl-f2
# Close =
Mark = f3
Copy = f5
Move = f6
Remove = f8
# MarkLine =
# MarkWord =
# MarkAll =
# Unmark =
Search = f7
SearchContinue = f17
# BlockShiftLeft =
# BlockShiftRight =
MarkPageUp = shift-pgup
MarkPageDown = shift-pgdn
MarkLeft = shift-left
MarkRight = shift-right
MarkToWordBegin = ctrl-shift-left
MarkToWordEnd = ctrl-shift-right
MarkUp = shift-up
MarkDown = shift-down
MarkToHome = shift-home
MarkToEnd = shift-end
MarkToFileBegin = ctrl-shift-home
MarkToFileEnd = ctrl-shift-end
MarkToPageBegin  = ctrl-shift-pgup
MarkToPageEnd = ctrl-shift-pgdn
MarkScrollUp = ctrl-shift-up
MarkScrollDown = ctrl-shift-down
# MarkParagraphUp =
# MarkParagraphDown =
MarkColumnPageUp = alt-pgup
MarkColumnPageDown = alt-pgdn
MarkColumnLeft = alt-left
MarkColumnRight = alt-right
MarkColumnUp = alt-up
MarkColumnDown = alt-down
# MarkColumnScrollUp =
# MarkColumnScrollDown =
# MarkColumnParagraphUp =
# MarkColumnParagraphDown =
BlockSave = ctrl-f
MarkColumn = f13
Replace = f4
ReplaceContinue = f14
Complete = alt-tab
InsertFile = f15
Quit = f10; esc
InsertOverwrite = insert
Help = f1
# Date =
Refresh = ctrl-l
Goto = alt-l
Sort = alt-t
Mail = alt-m
ParagraphFormat = alt-p
MatchBracket = alt-b
ExternalCommand = alt-u
UserMenu = f11
Menu = f9
Bookmark = alt-k
BookmarkFlush = alt-o
BookmarkNext = alt-j
BookmarkPrev = alt-i
# History =
Shell = ctrl-o
InsertLiteral = ctrl-q
# MacroStartRecord =
# MacroStopRecord =
MacroStartStopRecord = ctrl-r
# MacroDelete =
ShowNumbers = alt-n
ShowTabTws = alt-underline
SyntaxOnOff = ctrl-s
# SyntaxChoose =
# ShowMargin =
Find = alt-enter
FilePrev = alt-minus
FileNext = alt-plus
# RepeatStartStopRecord =
SelectCodepage = alt-e
# Options =
# OptionsSaveMode =
# SpellCheck =
SpellCheckCurrentWord = ctrl-p
# SpellCheckSelectLang =
# LearnKeys =
# WindowMove =
# WindowResize =
# WindowFullscreen =
# WindowList =
# WindowNext =
# WindowPrev =
# ExtendedKeyMap =

[viewer]
Help = f1
WrapMode = f2
Quit = f3; f10; q; esc
HexMode = f4
Goto = f5
Search = f7
SearchForward = slash
SearchBackward = question
SearchContinue = f17; n
SearchForwardContinue = ctrl-s
SearchBackwardContinue = ctrl-r
MagicMode = f8
NroffMode = f9
Home = ctrl-a
End = ctrl-e
Left = h; left; ctrl-left
Right = l; right; ctrl-right
#LeftQuick = ctrl-left
#RightQuick = ctrl-right
Up = k; y; insert; up; ctrl-p; ctrl-up
Down = j; e; delete; down; enter; ctrl-n; ctrl-down
PageDown = f; space; pgdn; ctrl-v
PageUp = b; pgup; alt-v; backspace
HalfPageDown = d
HalfPageUp = u
Top = home; ctrl-home; ctrl-pgup; a1; alt-lt; g
Bottom = end; ctrl-end; ctrl-pgdn; c1; alt-gt; shift-g
BookmarkGoto = m
Bookmark = r
FileNext = ctrl-f
FilePrev = ctrl-b
SelectCodepage = alt-e
Shell = ctrl-o
Ruler = alt-r

[viewer:hex]
Help = f1
HexEditMode = f2
Quit = f3; f10; q; esc
HexMode = f4
Goto = f5
Save = f6
Search = f7
SearchForward = slash
SearchBackward = question
SearchContinue = f17; n
SearchForwardContinue = ctrl-s
SearchBackwardContinue = ctrl-r
MagicMode = f8
NroffMode = f9
ToggleNavigation = tab
Home = ctrl-a; home
End = ctrl-e; end
Left = b; left; ctrl-left
Right = f; right; ctrl-right
Up = k; y; up; ctrl-up
Down = j; delete; down; ctrl-down
PageDown = pgdn; ctrl-v
PageUp = pgup; alt-v
Top = ctrl-home; ctrl-pgup; a1; alt-lt; g
Bottom = ctrl-end; ctrl-pgdn; c1; alt-gt; shift-g

[diffviewer]
ShowSymbols = alt-s; s
ShowNumbers = alt-n; l
SplitFull = f
SplitEqual = equal
SplitMore = gt
SplitLess = lt
Tab2 = 2
Tab3 = 3
Tab4 = 4
Tab8 = 8
Swap = ctrl-u
Redo = ctrl-r
HunkNext = n; enter; space
HunkPrev = p; backspace
Goto = g; shift-g
Save = f2
Edit = f4
EditOther = f14
Merge = f5
MergeOther = f15
Search = f7
SearchContinue = f17
Options = f9
Top = ctrl-home
Bottom = ctrl-end
Down = down; ctrl-down
Up = up; ctrl-up
#LeftQuick = ctrl-left
#RightQuick = ctrl-right
Left = left; ctrl-left
Right = right; ctrl-right
PageDown = pgdn
PageUp = pgup
Home = home
End = end
Help = f1
Quit = f10; q; shift-q; esc
Shell = ctrl-o
SelectCodepage = alt-e

Если посмотреть в код меню, то можно увидеть, что там всё захардкодено. Через mc.keymap ничего настроить нельзя. Не доделано, короче.

akk ★★★★★ ()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.