image
image

Go Back   macosx.com > Mac Help Forums > Mac OS X System & Mac Software

Reply
 
Thread Tools
  #1  
Old May 13th, 2002, 01:53 PM
hazmat's Avatar
Rusher of Din
 
Join Date: Oct 2001
Location: Brooklyn, NY
Posts: 1,803
Thanks: 0
Thanked 0 Times in 0 Posts
hazmat is on a distinguished road
How to add custom keystrokes for Cocoa apps

Sorry if this has been mentioned before. It always kind of pissed me off that Cocoa has built-in Unix keystrokes like ^A, ^E, and ^K, but not ^U to delete the entire line. In another discussion board, I found out how to define your own ones. The following in ~/Library/KeyBindings/DefaultKeyBinding.dict will make ^u delete the entire line, wherever the cursor is, and ^w will delete from the cursor to the beginning of the line. As if you thought OS X coudn't get any cooler....

Code:
< ?xml version="1.0" encoding="UTF-8"? >
< !DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd" >
< plist version="0.9" >
< dict >
< key >^u< /key >
 < array >
   < string >moveToBeginningOfParagraph:< /string >
   < string >deleteToEndOfParagraph:< /string >
 < /array >
< key >^w< /key >
< string >deleteToBeginningOfParagraph:< /string >
< /dict >
< /plist >

You'll have to kill the spaces around the angled brackets since I couldn't figure out a way to make it accept them as text. Anyone know?
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[HOW TO] Preserve a custom shell $PATH after logout. michaelsanford HOWTO & FAQs 2 February 21st, 2003 11:35 AM
10.2.2 changes how apps are updated jove Mac OS X System & Mac Software 11 November 13th, 2002 08:45 PM
PLEASE, Help me setting up mac os x firewall !! Zeus Mac OS X System & Mac Software 5 June 25th, 2002 09:48 AM


All times are GMT -5. The time now is 04:48 AM.


Mac Support® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2000-2008 DigitalCrowd, Inc.