Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [Close This] Shortcut Ctrl+C in a table behaves differently in Mac OSX than in Linux, Windows
Forum Updated to NodeBB v4.3 + New Features

[Close This] Shortcut Ctrl+C in a table behaves differently in Mac OSX than in Linux, Windows

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 2.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dcortesi
    wrote on last edited by
    #1

    On further investigation I find this behavior is in fact consistent across platforms. Not the behavior I expect (QShortCutContext of QWidgetShortCut does not restrict the shortcut to one widget), but not inconsistent as I thought.

    -Below is a small working PyQt4 program to demonstrate an inconsistency between Mac and other platforms. Excuse the length, it is as short as possible. When you run this code you get a nice window with an editor and a small table. The issue is with the Ctrl+C shortcut when the keyboard focus is in the table.-

    (program deleted)

    1 Reply Last reply
    0
    • T Offline
      T Offline
      timoph
      wrote on last edited by
      #2

      In mac the copy keyboard shortcut is cmd+c instead of ctrl+c.

      1 Reply Last reply
      0
      • D Offline
        D Offline
        dcortesi
        wrote on last edited by
        #3

        Of course it is. In Mac OS, one presses the CMD key and Qt normally delivers the Key_Control keypress and, on a following key, the ControlModifier mod. Exactly the same as pressing CONTROL and a key in Windows and Linux.

        I run this example (and the app it is derived from) on all three platforms and I am well aware of the key mappings. However perhaps I was not clear: when running the example in Mac OS, one presses CMD+C as one normally does. And then as I say, only the KeyControl keypress is delivered, and never the ControlModifier+C keypress.

        Note that for any Ctrl+X combination that is NOT defined as a shortCut to a menu, pressing CMD+X in mac delivers exactly the same as CTRL+X in the other platforms. The only difference is that in Mac, a shortcut such as Ctrl+C is not delivered.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved