Giter Club home page Giter Club logo

Comments (5)

zrax avatar zrax commented on July 21, 2024

I'm hesitant to deviate from QKeySequence's standard shortcuts without replacing its use everywhere... I haven't decided what to do about that yet, but I'll probably end up looking into Qt's sources at some point to see how bad the shortcut situation really is.

[...] but not Ctrl+U to delete a line.

I've never seen Ctrl+U for deleting a line... What editor(s) are you seeing this in?

For reference, I looked at:

  • kate: Ctrl+U capitalizes the current letter or selection; Ctrl+K deletes line
  • gedit: Ctrl+U capitalizes the current letter or selection; Ctrl+D deletes line
  • Notepad2: Ctrl+U lowercases the current selection; Ctrl+Shift+D deletes line
  • vscode: Ctrl+U is "soft undo"; Ctrl+Shift+K deletes line
  • clion: Ctrl+U is "goto supermothod"; Ctrl+Y deletes line
  • qtcreator: Ctrl+U selects the current bracket range; No delete line that I could find

As you can see, not a whole lot of consistency here... I'll probably just pick one, but which one might depend on whether I refactor all the shortcuts or not.

from qtextpad.

AcarBurak avatar AcarBurak commented on July 21, 2024

QKeySequence is OK; it's easy for me to replace it with sed before compilation; it's automatic with my PKGBUILD.

As for the Ctrl+U binding, sorry, I've seen it in the above link: https://doc.qt.io/qt-5/qkeysequence.html

By the way, have you seen my #8 (comment)?

from qtextpad.

AcarBurak avatar AcarBurak commented on July 21, 2024

And seemingly Ctrl+U is used for underline as well!

from qtextpad.

zrax avatar zrax commented on July 21, 2024

After digging into the sources a bit, it looks like Qt actually does the right thing, but only when the desktop correctly reports what it is through XDG_CURRENT_DESKTOP (and of course only for DEs that Qt knows). As an example, when running on xfce started standalone over VNC (which is a common use case of mine), xfce-session does not correctly set XDG_CURRENT_DESKTOP, meaning that the platform support plugin treats the app as "Generic Unix" rather than "XFCE". Setting XDG_CURRENT_DESKTOP=xfce(or the equivalent for your DE) causes the shortcuts to be mapped correctly, as well as affecting other desktop-specific settings such as toolbar icons.

from qtextpad.

AcarBurak avatar AcarBurak commented on July 21, 2024

Yes, I know, but setting XDG_CURRENT_DESKTOP to something has some other adverse consequences if I recall correctly, but I don't remember what they were. No big deal; sed is my friend.

from qtextpad.

Related Issues (15)

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.