Go Back   MacRumors Forums > Apple Systems and Services > OS X

Reply
 
Thread Tools Search this Thread Display Modes
Old Apr 17, 2013, 05:46 PM   #1
printz
macrumors regular
 
Join Date: Dec 2012
Can't set Service shortcuts while in text editors?

I'm using an Automator application menu service that spawns a new Terminal window and I've assigned a shortcut to it (control+alt+t). In most applications it works, but not in certain text editors like TextEdit or Smultron 5. I tried other control-based shortcuts, but neither those worked. Control+alt+t in particular even inserted invisible characters in the text! What gives? Can I bind some other keys while in text editors or am I out of luck?
printz is offline   0 Reply With Quote
Old Apr 18, 2013, 03:28 AM   #2
benwiggy
macrumors 68020
 
Join Date: Jun 2012
Services usually act upon the current selection. Their availability in the Services menu depends on what the current selected objects are.

For instance, in the Finder, there is already a service that creates a new Terminal window with the working directory of the currently selected folder. (in Lion and above.)

What does your service do that other ways of creating a new Terminal window does not?

Without seeing the Automator actions/script, it's hard to say more about why it isn't working.
__________________
2012 MacMini, 2.6GHz i7, 16Gb RAM, Fusion Drive | 2012 MacBook Pro, 16Gb RAM, 480 Gb SSD |
2009 MacBook | 2006 iMac | 2003 G3 iBook | Beige G3 | PowerMac 7600 | Mac IIsi |

Last edited by benwiggy; Apr 18, 2013 at 03:41 AM.
benwiggy is offline   0 Reply With Quote
Old Apr 18, 2013, 07:31 AM   #3
printz
Thread Starter
macrumors regular
 
Join Date: Dec 2012
Quote:
Originally Posted by benwiggy View Post
For instance, in the Finder, there is already a service that creates a new Terminal window with the working directory of the currently selected folder. (in Lion and above.)
There is? Where do I find it? Most of the time the Services submenu from Finder is empty. I had to write an AppleScript and package it into an app that's pinned to the Finder toolbar. It works great.

Regarding my service that I can't reliably bind a key shortcut to, it's an Automator unit that works on any application, receives no input, and all it does is run this AppleScript:
Code:
on run {input, parameters}
	
	(* Your script goes here *)
	tell application "Terminal"
		do script " "
		activate
	end tell
	return input
end run
On all applications, the service is visible from the submenu and works if clicked. On those where the keyboard shortcut works, the shortcut is also visible on the submenu. Of course maybe if i find another key combo it will eventually work, but it would be lovely to bypass this limitation, if possible.
printz is offline   0 Reply With Quote
Old Apr 18, 2013, 07:44 AM   #4
benwiggy
macrumors 68020
 
Join Date: Jun 2012
Quote:
Originally Posted by printz View Post
There is? Where do I find it?
System Preference > Keyboard > Keyboard Shortcuts > Services: "New Terminal at Folder".
I think it's unchecked by default. Just tick the box and it will be active.

If your Service is showing, but the key shortcut is missing, then perhaps the applications are using that combination and taking priority.

You can always just right-click on the Terminal icon in the Dock to create a new Terminal window. If you're looking for a keyboard command for that sort of thing (and others), then you might want to try iKey or Keyboard Maestro.
__________________
2012 MacMini, 2.6GHz i7, 16Gb RAM, Fusion Drive | 2012 MacBook Pro, 16Gb RAM, 480 Gb SSD |
2009 MacBook | 2006 iMac | 2003 G3 iBook | Beige G3 | PowerMac 7600 | Mac IIsi |
benwiggy is offline   0 Reply With Quote
Old Apr 18, 2013, 07:52 AM   #5
printz
Thread Starter
macrumors regular
 
Join Date: Dec 2012
Quote:
Originally Posted by benwiggy View Post
System Preference > Keyboard > Keyboard Shortcuts > Services: "New Terminal at Folder".
Awesome! Didn't know OS X has it already (I thought I had to work to have it )

EDIT: oh, i only see some folder-triggered services, and my Finder-pinned AppleScript works good enough anyway. I guess I can just right-click the dock icon if I'm not on fullscreen, or use Spotlight.
printz is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > OS X

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
What I learned today - block/rectangular select in Text Editors sotiredofsoup Mac Programming 0 Mar 13, 2014 10:39 AM
What do you guys like for iOS text editors? ... cmeisenzahl iPhone and iPod touch Apps 2 Nov 22, 2013 10:24 AM
how can I set these keyboard shortcuts for Safari? jayo123456 OS X 0 Sep 1, 2013 02:24 PM
text shortcuts laudern OS X 10.8 Mountain Lion 2 Jan 23, 2013 02:53 AM
Text Shortcuts help trlyka iPhone Tips, Help and Troubleshooting 2 Oct 22, 2012 10:49 AM

Forum Jump

All times are GMT -5. The time now is 03:52 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC