Pick of the Week - Nov 10 [Show all picks]
Path Finder 5 - A feature-laden Finder replacement
Submit Hint Search The Forums LinksStatsPollsFAQHeadlinesRSS
12,000 hints and counting!

Keyboard Viewer and Character Palette via AppleScript Apps
If you don't like using the Input Menu (System Preferences: International: Input Menu tab) to activate the Keyboard Viewer and Character Palette, here are two AppleScripts that do the same thing:

Keyboard Viewer: Get this script
tell application "Finder"
open item "System:Library:Components:KeyboardViewer.component:
 Contents:SharedSupport:KeyboardViewerServer.app" of the startup disk
end tell
Character Palette: Get this script
tell application "Finder"
open item "System:Library:Components:CharacterPalette.component:
 Contents:SharedSupport:CharPaletteServer" of the startup disk
end tell
Once the scripts are created, you can put them in your Dock, Sidebar, assign a hot key (via your favorite third-party tool), etc.

[robg adds: Please note that in the displayed code for both scripts, the open item line has been broken in two (for a narrower display here) just after component: bit. Remove the line break (and extra spaces) when creating the scripts, or they won't work properly. The easiest thing to do, though, is just click the "Get this script" link for each script to open it directly in your copy of Script Editor.]
    •    
  • Currently 4.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[17,317 views]  

Keyboard Viewer and Character Palette via AppleScript | 16 comments | Create New Account
Click here to return to the 'Keyboard Viewer and Character Palette via AppleScript' hint
The following comments are owned by whomever posted them. This site is not responsible for what they say.
Keyboard Viewer and Character Palette via AppleScript
Authored by: chtito on Thu, Oct 27 2005 at 6:58AM PDT
Great tip! I hadn't realised that those were applications. In fact you can simply drag those two applications (CharPaletteServer.app and KeyboardViewerServer.app) onto the dock without bothering to create the applescripts...

[ Reply to This | # ]
Keyboard Viewer and Character Palette via AppleScript
Authored by: JazzJoey on Thu, Oct 27 2005 at 7:33AM PDT
The main function of these scripts is
the possibilty of implementing it in
other apps or scripts, simply because
it saves time, dock space, sidebar space,
and is compact handy in your favourite
app like mine.

Thus you could combine both scripts when
you are a writer etc....

But of course you should use it in the
way you want it to be.

---
Joey
headmaster@spymac.com

[ Reply to This | # ]
Help request: Keyboard Viewer and Character Palette Location??
Authored by: Deut3221 on Thu, Oct 27 2005 at 11:51AM PDT
where do I find the server.apps so that I can drag them to the dock? thx!!!!

[ Reply to This | # ]
Help request: Keyboard Viewer and Character Palette Location??
Authored by: JazzJoey on Thu, Oct 27 2005 at 12:04PM PDT
[b]To get the Keyboard Viewer application:[/b] 1.) Go to Finder 2.) Select Menu "Go" 3.) Choose "Go to Folder... 4.) Paste this Path: System/Library/Components/KeyboardViewer.component/Contents/SharedSupport/ [b]To get the Character Palette:[/b] 1.) Go to Finder 2.) Select Menu "Go" 3.) Choose "Go to Folder... 4.) Paste this Path: System/Library/Components/CharacterPalette.component/Contents/SharedSupport/

---
Joey
headmaster@spymac.com

[ Reply to This | # ]

Great, no more US flag in the menu bar!
Authored by: germ on Thu, Oct 27 2005 at 12:52PM PDT
Keyboard Viewer and Character Palette via AppleScript
Authored by: elmimmo on Thu, Oct 27 2005 at 2:53PM PDT
Or just navigate to /System/Library/Components/KeyboardViewer.component/Contents/SharedSupport/ and make an alias of KeyboardViewerServer.app wherever you want. ^_-

[ Reply to This | # ]
Keyboard Viewer and Character Palette via AppleScript
Authored by: tobyvoss on Wed, Jan 3 2007 at 9:28AM PST
/System/Library/Components/CharacterPalette.component/Contents/SharedSupport/CharPaletteServer.app
/System/Library/Components/KeyboardViewer.component/Contents/SharedSupport/KeyboardViewerServer.app
and
/System/Library/Components/Ink.component/Contents/SharedSupport/InkServer.app
are the only non-asian-(language/font) "utilitylets" around there. nice that they can be as easily accessed!

[ Reply to This | # ]
Keyboard Viewer and Character Palette via AppleScript
Authored by: chrononaut on Sat, Jun 21 2008 at 4:02PM PDT
This works best for me as I can pull it up in Spotlight after it sees the alias. Also, I changed the info.plist file in a similar way to this hint.

i=/System/Library/Components/KeyboardViewer.component/Contents/\
SharedSupport/KeyboardViewerServer.app/Contents/Info.plist
sudo defaults write "${i%.plist}" LSBackgroundOnly 0
sudo defaults write "${i%.plist}" LSUIElement 0
And if you prefer the window-style different I edited the KeyboardViewerServer.app/Contents/Resources/English.lproj/MainMenu.nib file with Interface Builder. I selected 'Keyboard Viewer' from the main window and deselected 'Utility' and 'Non Activating' from the Inspector window.

[ Reply to This | # ]
Keyboard Viewer and Character Palette via AppleScript
Authored by: thellum on Fri, Oct 28 2005 at 9:31AM PDT
Why not just enable these two apps in System Prefs > International > Input Menu? This way they are there under the national flag icon in the menu bar - hidden but easily accessable. If you have to travel down to the dock for a click on an applescript, is it not the same to travel up to the flag icon to see either palette?

---
The whatchamacallit has to be whatever
or else the whosits will go hey-hey.
~ Scott Adams

[ Reply to This | # ]
Keyboard Viewer and Character Palette checkboxes missing from Input Menu preferences
Authored by: perrysmotors on Wed, Nov 14 2007 at 5:25AM PST
I can't enable them because they are not there. Is anyone else experiencing this problem?

[ Reply to This | # ]
Keyboard Viewer and Character Palette checkboxes missing from Input Menu preferences
Authored by: perrysmotors on Wed, Nov 14 2007 at 5:31AM PST
I forgot to say that the Edit Menu > "Special Characters..." menu item does nothing when I select it.

[ Reply to This | # ]
Scripts won't work on relaunch
Authored by: michaeldoc on Sat, Oct 29 2005 at 3:37AM PDT
Hi. Thanks for the hint. I love applescript and out of curiousity tried the scripts. The problem I had (OSX 10.39) was that once the palette and the keyboard had been used and closed, the scripts would not reopen the items. Sure enough, activity monitor showed that they were still active as background processes. I had to force quit them for the applescript to work again. I have only occasional need for these scripts, but thought anyone using them should be aware of this.

[ Reply to This | # ]
Keyboard Viewer and Character Palette via AppleScript
Authored by: JazzJoey on Sun, Oct 30 2005 at 1:46AM PST
The main function of this script is to[br /] include it in other scripts/software.[br /] Don`t tell me you like the annoying[br /] input-menu more.[br /] If you are a PowerUser like me, you know[br /] what lies behind such scripts, which by the[br /] way can not be found anywhere else ![br /] Be happy or not, but do not bother somebody[br /] who helped you !!! [b]Damn ![/b] [b]Here is a script that should work with 10.3.9 as well:[br /][/b]

tell application "System Events"
	if exists process "CharPaletteServer" then
		try
			quit application "CharPaletteServer"
		end try
	end if
end tell
tell application "Finder"
	open item "System:Library:Components:CharacterPalette.component:Contents:SharedSupport:CharPaletteServer" of the startup disk
end tell

---
Joey
headmaster@spymac.com

[ Reply to This | # ]

Keyboard Viewer and Character Palette via AppleScript
Authored by: emale on Sun, Jan 3 2010 at 6:12AM PST
This has to be modified to work with 10.6:

tell application "Finder"
open item "System:Library:Input Methods:CharacterPalette.app" of the startup disk
end tell

and

tell application "Finder"
open item "System:Library:Input Methods:KeyboardViewer.app" of the startup disk
end tell


[ Reply to This | # ]
Keyboard Viewer and Character Palette via AppleScript
Authored by: macnai on Wed, Jan 6 2010 at 12:30PM PST
Can't get the Keyboard viewer to launch with this script on 10.6. The character palette one works fine.
Edited on Wed, Jan 6 2010 at 12:31PM PST by macnai


[ Reply to This | # ]
Keyboard Viewer and Character Palette via AppleScript
Authored by: emale on Thu, Jan 7 2010 at 9:54AM PST
I have to admit, that to assume, the KeyboardViewser-script works too, if the CharacterPalette-script works was no good idea.
But I found another, less easy, method to start KeyboardViewer here.

The site contains a download link for a UNIX binary file, the explanation how to install it and an alternative AppleScript, that finally works. Have really tested that ;-)

[ Reply to This | # ]