zyedidia / micro

A modern and intuitive terminal-based text editor
https://micro-editor.github.io
MIT License
25.11k stars 1.17k forks source link

Can't Use keybinding with alt and shift #2749

Open GhostShadow0316 opened 1 year ago

GhostShadow0316 commented 1 year ago

Description of the problem or steps to reproduce

I want to make a keybinding Shift-Alt-Down for DuplicateLine it works fine when I use another keybinding...

Specifications

Commit hash: 225927b9 OS: Window10 Terminal: Windows Terminal

Gavin-Holt commented 1 year ago

Hi

Windows terminal will not pass this key binding.

I use Autohotkey to translate key cords to something Micro will understand.

Zyedidia has kindly included F13-F64 as bindable keys, which I use for these translations. e.g.

#IfWinActive ahk_exe micro.exe
{
    ; Find current word
    ^8::Send {F15}{ENTER}

    ; Bookmarks
    ^`::Send {F16}
    ^+`::Send {F17}

    ; Shell commands: Ctrl+# Ctrl+Shift+#
    ^!SC02B:: Send {F20}

    ; CtrlSpace
    ^space:: Send {F21}
    ^+space:: Send {F22}

    ; CtrlEnter
    ^Enter:: Send {F25}
}

Kind Regards Gavin Holt

GhostShadow0316 commented 1 year ago

thank you! but I have another question now, can I enable the ahk script when I'm in micro or when I'm in wt, but disable it when Im not

btw I use micro to code autohotkey most of the time

Gavin-Holt commented 1 year ago

Hi I have autohotkey running all the time. Within ahk script the following directive focuses hot key translations to micro:

#IfWinActive ahk_exe micro.exe
{

}
Gavin-Holt commented 1 year ago

Correction:

It seems the version of AutoHotkey I am using (1.1.33.00) will only support F1-F24 with modifiers.

Kind Regards Gavin Holt