Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow hotkey scheme to be an arbitrary string #686

Merged
merged 8 commits into from
Nov 22, 2024

Conversation

o-sdn-o
Copy link
Collaborator

@o-sdn-o o-sdn-o commented Nov 22, 2024

Changes

  • Allow hotkey scheme to be an arbitrary string.
  • Fix insertion for lazy grapheme clustering.
  • Allow multiple key chords in one settings statement.
  • Make a key combination action parameterized.
  • Fix handled key combination leak.
  • Replace ToggleHotkeyScheme with SwitchHotkeyScheme.
  • Introduce parameterized actions TerminalScrollViewportByPage and TerminalScrollViewportByCell.
<config>
    <term>
        <menu>
            <item type="Option" action=SwitchHotkeyScheme label=" Keys0 " data="">
                <label="\e[48:2:0:128:128;38:2:0:255:0m Keys1 \e[m" data="1"/>
                <tooltip>
                    " Toggle hotkey scheme                          \n"
                    "   Alternative hotkey scheme allows keystrokes \n"
                    "   to be passed through without processing     "
                </tooltip>
            </item>
        </menu>
    </term>
    <hotkeys>  <!-- The required key combination sequence can be generated on the Info page, accessible by clicking on the label in the lower right corner of the vtm desktop. -->
        <tui key*>  <!-- TUI matrix layer key bindings. The scheme=0 is implicitly used by default. -->
            <key="Space-Backspace | Backspace-Space" action=ToggleDebugOverlay/>  <!-- Toggle debug overlay. -->
            <key="Ctrl-Alt | Alt-Ctrl" scheme=""> <action=SwitchHotkeyScheme data="1"/></key>  <!-- Switch the hotkey scheme to "1" by pressing and releasing Ctrl-Alt or Alt-Ctrl (reversed release order). -->
            <key="Ctrl-Alt | Alt-Ctrl" scheme="1"><action=SwitchHotkeyScheme data=""/> </key>  <!-- Switch the hotkey scheme to default by pressing and releasing Ctrl-Alt or Alt-Ctrl (reversed release order). -->
        </tui>
        <term key*>  <!-- Application specific layer key bindings. -->
            <key="Alt+RightArrow" action=TerminalFindNext/>  <!-- Highlight next match of selected text fragment. Clipboard content is used if no active selection. -->
            <key="Alt+LeftArrow"  action=TerminalFindPrev/>  <!-- Highlight previous match of selected text fragment. Clipboard content is used if no active selection. -->
            <key="Shift+Ctrl+PageUp">       <action=TerminalScrollViewportByPage data=" 0, 1"/></key>  <!-- Scroll viewport one page up. -->
            <key="Shift+Ctrl+PageDown">     <action=TerminalScrollViewportByPage data=" 0,-1"/></key>  <!-- Scroll viewport one page down. -->
            <key="Ctrl+PageUp"   scheme="1"><action=TerminalScrollViewportByPage data=" 0, 1"/></key>  <!-- Scroll viewport one page up. -->
            <key="Ctrl+PageDown" scheme="1"><action=TerminalScrollViewportByPage data=" 0,-1"/></key>  <!-- Scroll viewport one page down. -->
            <key="Shift+Alt+LeftArrow">     <action=TerminalScrollViewportByPage data=" 1, 0"/></key>  <!-- Scroll viewport one page to the left. -->
            <key="Shift+Alt+RightArrow">    <action=TerminalScrollViewportByPage data="-1, 0"/></key>  <!-- Scroll viewport one page to the right. -->
            <key="Shift+Ctrl+UpArrow">      <action=TerminalScrollViewportByCell data=" 0, 1"/></key>  <!-- Scroll viewport one line up. -->
            <key="Shift+Ctrl+DownArrow">    <action=TerminalScrollViewportByCell data=" 0,-1"/></key>  <!-- Scroll viewport one line down. -->
            <key="Shift+Ctrl+LeftArrow">    <action=TerminalScrollViewportByCell data=" 1, 0"/></key>  <!-- Scroll viewport one cell to the left. -->
            <key="Shift+Ctrl+RightArrow">   <action=TerminalScrollViewportByCell data="-1, 0"/></key>  <!-- Scroll viewport one cell to the right. -->
        </term>
    </hotkeys>
</config>

@o-sdn-o o-sdn-o merged commit 37a1522 into directvt:master Nov 22, 2024
8 checks passed
@o-sdn-o o-sdn-o deleted the gui-bridge branch November 22, 2024 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant