Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I managed to add a shortcut for keyboard viewer via BetterTouchTool. However, once I run Keyboard Viewer and close via the red X button, I cannot re-open it again via a shortcut. So I checked activity monitor and realised that it is actually still there, although I quit the application !

I tried displaying the keyboard viewer via the language selection button on the menu bar and then pressing Show Keyboard Viewer, the keyboard viewer opens every time. Also, I can re-open the application after closing it via a keyboard shortcut ONLY WHEN I open the viewer via the menu button or settings.

  • Why does the application not quit properly when assigned to a keyboard shortcut ?

  • Is there a way to force a specific app to force quit after some idle time ?

rMBP Mountain Lion OSX 10.8

share|improve this question
add comment

1 Answer 1

up vote 0 down vote accepted

open -a and launch seem to keep it open as well. But if you show the keyboard viewer from the input menu and close the window, the process is quit immediately. So one workaround might be to emulate clicking the menu item:

tell application "System Events" to tell process "SystemUIServer"
    tell (menu bar item 1 where description is "text input") of menu bar 1
        click
        click menu item "Show Keyboard Viewer" of menu 1
    end tell
end tell

Also, I can re-open the application after closing it via a keyboard shortcut ONLY WHEN I open the viewer via the menu button or settings.

If all windows have been closed, activate doesn't usually open a new default window. reopen would do that, but it doesn't seem to work with KeyboardViewer.

share|improve this answer
    
Haven't tried it, but this answers my question about why the application wont quit after pressing the X button –  Render Aug 8 '12 at 17:52
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.