7 Replies Latest reply: Mar 5, 2009 2:51 PM by Light Speed
Light Speed Level 2 (475 points)
I want to require a command key to be able to drag something from the dock.

This is not a current feature of the Dock Application.

How can I hack the app to add that functionality?

24" iMac, Mac OS X (10.5.5)
  • thomas_r. Level 7 (30,727 points)
    You would need to learn programming, which is not a topic for this forum. AFAIK, no such hack already exists, though I'm fairly sure I wouldn't have heard of it if it did. Seems like an odd hack that there wouldn't be much demand for.

    What is the actual problem you're trying to solve with this hack? Maybe we can help you with that.
  • Light Speed Level 2 (475 points)
    I have some programming experience and wanted to get pointed to the right files to edit.

    I use a tablet as my main input device to use my computer rather than a mouse.
    Using a tablet means it is much easier to accidentally drag (remove) an icon from the dock when just trying to click on it as if you slightly slide the tip of the pen when taping (clicking) it can be enough to remove the icon. This means when this happens I have to find the app and drag it's icon back to the dock.

    I have submitted requests to Apple for 7 years to add a Dock preference that allows the user to set a modifier key for removing an application from the dock. I am tired of requesting and just want to fix it myself.

    I understand that I would have to replace my modified Dock app files with originals before I run any updates and then re-implement the hack which is fine.

    If this is not the appropriate forum for something this un GUI related can you please point me to a forum which is more OS X code editing related?
  • thomas_r. Level 7 (30,727 points)
    This is going to be much more complex than just editing a file somewhere. I've been a hobbyist Mac developer for almost 25 years, and I wouldn't have a clue how to get started with this. It's going to take some work.

    If you're up for it, go to the Apple Developer Connection site and set up a free account. Unfortunately, there aren't any free forums there that I'm aware of, so you'll have to find another place to ask questions. Too bad there aren't any developer forums here. I've been a bit out of the developer loop for a few years, so I'm afraid I can't point you to current forums/mailing lists.

    Alternatively, you could try a different launcher. People bash the Dock all the time, but I like it. Still, I've discovered that I like Quicksilver even more than the Dock. It's free, and it lets you use your keyboard to launch apps. Just press control-space (you can change this if you like) and type a few letters of the app's name. Depending on the app and how often you use it, you may only have to type one or two letters. If you prefer to avoid the keyboard, another launcher might do better for you.
  • Light Speed Level 2 (475 points)
    Thanks for your insight Thomas!

    I will poke around for a dev forum.
  • gumsie Level 4 (2,155 points)
    There is a way to lock the dock. I think [Onyx|http://www.titanium.free.fr/pgs2/english/download.html], free, and [Cocktail|http://www.maintain.se/cocktail/index.php], not free, both allow you to. You can't use a simple command keystroke to do it though, I think it's you have to run them each time you want to unlock it.
  • Joe Swenson Level 3 (735 points)
    Learn how to use Workgroup Manager on the local domain to set the dock to be unmodifiable
  • Light Speed Level 2 (475 points)
    An unmodifiable dock is not an option as I add and remove documents (on purpose) quite regularly and I already know about locking through Onyx but again a longer road and not a usable workflow solution.