• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
equivalent of the "X Selection" for cocoa apps?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

equivalent of the "X Selection" for cocoa apps?


  • Subject: equivalent of the "X Selection" for cocoa apps?
  • From: Matthew <email@hidden>
  • Date: Sun, 20 Feb 2005 00:26:10 -0500

Hi,

Forgive me for asking about a topic that I'm not even sure how to describe properly or know much about.

I've noticed in recent times that for some Linux distributions use what appears to be called the "X Selection" to facilitate cutting and pasting. So instead of having to explicitly press ctrl-C (in Linux), you simply can make a selection and then use ctrl-V or the middle mouse button to paste--shortcutting the explicit ctrl-C keystroke for the copy.

Obviously there are a few ways to approach simulating this behavior for OS X, but before I begin, can anyone say whether or not a simple app already exists that does this? This is bit difficult to search for on the net. A thread from slashdot that's semi-relevant that mentions the "SELECTION buffer": http://slashdot.org/articles/01/01/09/2024229_F.shtml

I know nothing about how X Windows does its business so maybe this was hard or easy to make happen in Linux. I don't know, and don't really care.

But for Cocoa, is there simply a notification that can be registered for the says "a selection has been made that *could* be copied"? If so, then it seems that you'd just register for that, take the selection, and then stick it on the pasteboard.

To make this general purpose, you'd have to think broader than just mouse events, because users can make selections by using the Shift key and the arrow keys--so I'm inclined to think there might be a simple "get the selection from the active window" mechanism.

If it's not that simple, could someone say a word or two about the difficulty involved?

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: equivalent of the "X Selection" for cocoa apps?
      • From: "M. Uli Kusterer" <email@hidden>
  • Prev by Date: Lining up NSViews in NSScrollView
  • Next by Date: Obtain Key Code From Ascii Value
  • Previous by thread: Re: Lining up NSViews in NSScrollView
  • Next by thread: Re: equivalent of the "X Selection" for cocoa apps?
  • Index(es):
    • Date
    • Thread