Giter Site home page Giter Site logo

qkeysequenceoverride's People

Contributors

jsm222 avatar probonopd avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

jsm222

qkeysequenceoverride's Issues

Does not build on Debian

Does not build, fatal error: 'QKeySequence' file not found. build.sh hardcodes BSDism /usr/local/, should be fixed.
Even with editing this, it has the same error.

Tested on Raspberry Pi OS.

Note: I had only Qt 5 installed, maybe I also need Qt 6.

Implement more replacements

https://github.com/qt/qtbase/blob/7dd81686e8e9ee86624c5bcca10688cfb360dcb8/src/gui/kernel/qkeysequence.cpp#L73-L94

static const MacSpecialKey entries[NumEntries] = {
    { Qt::Key_Escape, 0x238B },
    { Qt::Key_Tab, 0x21E5 },
    { Qt::Key_Backtab, 0x21E4 },
    { Qt::Key_Backspace, 0x232B },
    { Qt::Key_Return, 0x21B5 },
    { Qt::Key_Enter, 0x2324 },
    { Qt::Key_Delete, 0x2326 },
    { Qt::Key_Home, 0x2196 },
    { Qt::Key_End, 0x2198 },
    { Qt::Key_Left, 0x2190 },
    { Qt::Key_Up, 0x2191 },
    { Qt::Key_Right, 0x2192 },
    { Qt::Key_Down, 0x2193 },
    { Qt::Key_PageUp, 0x21DE },
    { Qt::Key_PageDown, 0x21DF },
    { Qt::Key_Shift, kShiftUnicode },
    { Qt::Key_Control, kCommandUnicode },
    { Qt::Key_Meta, kControlUnicode },
    { Qt::Key_Alt, kOptionUnicode },
    { Qt::Key_CapsLock, 0x21EA },
};

Leads to segfault for Qt6 applications

Preloading this leads to Qt5 being loaded in addition to Qt6, which leads to

% qtcreator
zsh: segmentation fault  qtcreator

We need to find a way to change QKeySequence::toString() without using LD_PRELOAD. Is the only way to recompile (parts of) Qt?

Does not work well with QTerminal

Looks like QTerminal really doesn't play well with QKeySequenceOverride in place.

Running it causes its config file to be rewritten automatically like this:

sudo env PAGER=cat pkg.real update && sudo env PAGER=cat pkg.real upgrade
(...)
[Shortcuts]
Add%20Tab=\x2318\x21e7T
Bottom%20Subterminal=\x2325\x2193
Clear%20Active%20Terminal=\x2318\x21e7X
Close%20Tab=\x2318\x21e7W
Collapse%20Subterminal=
Copy%20Selection=\x2318\x21e7\x43
Find=\x2318\x21e7\x46
Fullscreen=F11
Handle%20history=
Hide%20Window%20Borders=
Left%20Subterminal=\x2325\x2190
Move%20Tab%20Left=\x2325\x21e7\x2190|\x2318\x21e7Pg\x2191
Move%20Tab%20Right=\x2325\x21e7\x2192|\x2318\x21e7Pg\x2193
New%20Window=\x2318\x21e7N
Next%20Tab=\x2318Pg\x2193
Next%20Tab%20in%20History=\x2318\x21e7\x21e5
Paste%20Clipboard=\x2318\x21e7V
Paste%20Selection=\x21e7Ins
Preferences...=
Previous%20Tab=\x2318Pg\x2191
Previous%20Tab%20in%20History=\x2318\x21e5
Quit=\x2318Q
Rename%20Session=\x2325\x21e7S
Right%20Subterminal=\x2325\x2192
Show%20Tab%20Bar=
Split%20Terminal%20Horizontally=
Split%20Terminal%20Vertically=
Tab%201=
Tab%2010=
Tab%202=
Tab%203=
Tab%204=
Tab%205=
Tab%206=
Tab%207=
Tab%208=
Tab%209=
Toggle%20Bookmarks=\x2318\x21e7\x42
Toggle%20Menu=\x2318\x21e7M
Top%20Subterminal=\x2325\x2191
Zoom%20in=\x2318+
Zoom%20out=\x2318-
Zoom%20reset=\x2318\x30

Apparently QTerminal is making the assumption that what gets returened by QKeySequence::toString() is in a certain format.

Find a way to do this without LD_PRELOAD

Since @antony-jr has been injecting menu items using Qt plugins rather than LD_PRELOAD I wonder if it would be possible to do what this repo does but as a Qt plugin. Would feel a bit cleaner to me, although the current solution appears to work fine.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.