Welcome to DU! The truly grassroots left-of-center political community where regular people, not algorithms, drive the discussions and set the standards. Join the community: Create a free account Support DU (and get rid of ads!): Become a Star Member Latest Breaking News General Discussion The DU Lounge All Forums Issue Forums Culture Forums Alliance Forums Region Forums Support Forums Help & Search
4 replies = new reply since forum marked as read
Highlight: NoneDon't highlight anything 5 newestHighlight 5 most recent replies
Keyboard shortcuts (Cntl-a, -c, -v) are controlled by the OS. True or false? (Original Post) raccoon Oct 2012 OP
Correct. Pab Sungenis Oct 2012 #1
true d_r Oct 2012 #2
Technically it is controlled by the application you are using. ManiacJoe Oct 2012 #3
False, It is handled by the Form of the Control that has Focus. ChromeFoundry Oct 2012 #4

d_r

(6,907 posts)
2. true
Thu Oct 18, 2012, 10:48 AM
Oct 2012

but honestly not the OS but the user interface, but I don't think that most mac or windows users would notice the difference between OS and UI.

Also, just imho, many common shortcuts like cntl -c -v and -x are so widely used that a lot of UI's do them - I use them on unity and kde and lde for example.

ManiacJoe

(10,136 posts)
3. Technically it is controlled by the application you are using.
Thu Oct 18, 2012, 11:18 AM
Oct 2012

However, the base libraries that come with the OS give a default behavior that in these cases most programmers don't change.

ChromeFoundry

(3,270 posts)
4. False, It is handled by the Form of the Control that has Focus.
Thu Oct 18, 2012, 03:09 PM
Oct 2012

The Form of the control with focus can optionally handle windowing message events.
If the control has an event handler, the event is sent from the Parent Form to the Control.
When a CTRL+C sequence is pressed, the Form searches for a matching event handler (eg. KeyDown) for the control that has focus or it performs its own processing.
The TextBox control is a Windows control that has a set of default Event Handlers predefined. CTRL+C, A, and V are all handled by the default implementation. A developer can Override these default handlers and perform different actions or ignore the event completely.

Example:

(Keyboard) -> (Driver/Operating System)
  + WindowMgr ->
    + Window (MessageQueue) -> (Event:KeyDown) ->
      + Form (optional EventHandler:KeyDown) or ->
        + TextBox (optional EventHandler:KeyDown) or ->
          + (base EventHandler:KeyDown) or ->
            + (ignore)


If you wanted to change the way a CTRL+C sequence is handled, You would attach a handler method to the TextBox's KeyDown Event or the Form if the sequence is not specific to the TextBox control (example: Exit the Application).

This is probably more information than you care to know, but it is import to remember that if you set focus to your clock in the taskbar, then press CTRL+C - nothing happens. The time is not copied to the Clipboard. The event is just ignored because the Clock control does not implement the TextBox control. Where as, an application like Notepad is nothing more than a big TextBox control, plus a Menu control. The TextBox control in Notepad is a tool available from the Window Manager... The Notepad application makes a copy of the tool and places it on it's Form. The application can add, delete or override default events for the controls it creates. CTRL+C has a default event for a TextBox when it is not created as a password TextBox.
Latest Discussions»Help & Search»Computer Help and Support»Keyboard shortcuts (Cntl-...