HomeLatest ThreadsGreatest ThreadsForums & GroupsMy SubscriptionsMy Posts
DU Home » Latest Threads » Forums & Groups » Topics » Computers & Internet » Computer Help and Support (Group) » Keyboard shortcuts (Cntl-...

Thu Oct 18, 2012, 10:25 AM

Keyboard shortcuts (Cntl-a, -c, -v) are controlled by the OS. True or false?


I'm asking because I think they are, don't know for certain.







4 replies, 738 views

Reply to this thread

Back to top Alert abuse

Always highlight: 10 newest replies | Replies posted after I mark a forum
Replies to this discussion thread
Arrow 4 replies Author Time Post
Reply Keyboard shortcuts (Cntl-a, -c, -v) are controlled by the OS. True or false? (Original post)
raccoon Oct 2012 OP
Pab Sungenis Oct 2012 #1
d_r Oct 2012 #2
ManiacJoe Oct 2012 #3
ChromeFoundry Oct 2012 #4

Response to raccoon (Original post)

Thu Oct 18, 2012, 10:31 AM

1. Correct.

 

The OS decides what to do with any key combination.

Reply to this post

Back to top Alert abuse Link here Permalink


Response to raccoon (Original post)

Thu Oct 18, 2012, 10:48 AM

2. true

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.

Reply to this post

Back to top Alert abuse Link here Permalink


Response to raccoon (Original post)

Thu Oct 18, 2012, 11:18 AM

3. Technically it is controlled by the application you are using.

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

Reply to this post

Back to top Alert abuse Link here Permalink


Response to raccoon (Original post)

Thu Oct 18, 2012, 03:09 PM

4. False, It is handled by the Form of the Control that has Focus.

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.

Reply to this post

Back to top Alert abuse Link here Permalink

Reply to this thread