kanji koohii FORUM
one key for one language→ mac - Printable Version

+- kanji koohii FORUM (http://forum.koohii.com)
+-- Forum: Learning Japanese (http://forum.koohii.com/forum-4.html)
+--- Forum: Off topic (http://forum.koohii.com/forum-13.html)
+--- Thread: one key for one language→ mac (/thread-9602.html)

Pages: 1 2


one key for one language→ mac - Mesqueeb - 2012-06-13

Hey all,
I have a Japanese Macbook so I can easily switch between English and Japanese with the default buttons next to the space bar.

However I constantly type Chinese lately, and if I need to go to Chinese input I need to press command+spacebar and go through the list of 4 language setups to get my Chinese. → meaning I often need to press spacebar 3 times just to return to Chinese......

But just like the English and Japanese I'd like to assign one shortcut to instantly go to Chinese, and not go through the list of all options....

After an hour of googling I found nothing, only the list-way. ><

Does anyone know a program that would allow me to do this, or would it be hard to create a small program that allows one shortcut for one language? Just like the English and Japanese button my Japanese macbook has?

Thanks!

-Mesqueeb


one key for one language→ mac - Mesqueeb - 2012-06-13

I could assign a script to a keyboard shortcut.

Does anyone know how to write a script that does just:
Switch Input Method to Chinese.

This would solve my problem.


one key for one language→ mac - Crispy - 2012-06-13

Sorry, don't know. I'd just hit Cmnd + Space and hold Cmnd. It brings up the list on your screen and using the arrow keys is a little bit faster than hitting space bar.


one key for one language→ mac - Mesqueeb - 2012-06-16

Hyperborea Wrote:Find the "Select the previous input source" and "Select next source in Input menu" items. Click on the key combo listed to the right of those items and enter the key or key combo that you would like to use. Those should now be set as the way to do that function.
This is what I am using now and it's too slow ^^ I have to press Cmd Space to get the list, but because I have 4 languages, I often need to press space 3 times more or down arrow after I get the languages list.

I'd like to have just one button to get a language of choice. But I think that's impossible, unless someone knows a script that choses language x.


one key for one language→ mac - Khakionion - 2012-06-16

It's not impossible, I think, to write an app that would pre-empt presses of the Caps Lock key to switch input modes (that's how Kotoeri does it).

I don't have time this weekend to look at that, but I'd like a similar app for switching between Korean/Japanese/Dvorak, so if I find the time to knock it out I'll update this thread (and the Software Tools thread for good measure).


one key for one language→ mac - Mesqueeb - 2012-06-17

Khakionion Wrote:It's not impossible, I think, to write an app that would pre-empt presses of the Caps Lock key to switch input modes (that's how Kotoeri does it).

I don't have time this weekend to look at that, but I'd like a similar app for switching between Korean/Japanese/Dvorak, so if I find the time to knock it out I'll update this thread (and the Software Tools thread for good measure).
That would be great!
But remember, I don't want a shortcut to go through my input methods Chinese(S)/Chinese(T)/Japanese/Dvorak, because that's already there in MAC with command+space.
Further more, the Japanese keyboard has one key to go to Japanese, and one key to go to english input.

So this is what I want, assign one key to go to traditional Chinese, with one hit of that button, instantly.

(and the CAPS lock key would be a good option!)

Cheers if you can figure something out!

And Cheers because this is the end of my post. ^^

Mesqueeb


one key for one language→ mac - callmedodge - 2012-06-20

The button you`re talking about is standard on all Japanese keyboards, Mac or otherwise. I think if you want that you`re going to need to invest in a Chinese keyboard or maybe a custom app might work, I don`t know.

The button is unfortunately not Mac exclusive and doesn`t pertain so much to the Mac software as all input software on both Mac and Windows OS systems. I`ve an American Mac and unfortunately I have to do what you do for Chinese when I want to switch to Japanese. I wouldn`t mind a similar app myself as it is quite a pain in the hole.

Edit: typo


one key for one language→ mac - Mesqueeb - 2012-06-22

callmedodge Wrote:The button you`re talking about is standard on all Japanese keyboards, Mac or otherwise. I think if you want that you`re going to need to invest in a Chinese keyboard or maybe a custom app might work, I don`t know.

The button is unfortunately not Mac exclusive and doesn`t pertain so much to the Mac software as all input software on both Mac and Windows OS systems. I`ve an American Mac and unfortunately I have to do what you do for Chinese when I want to switch to Japanese. I wouldn`t mind a similar app myself as it is quite a pain in the hole.

Edit: typo
Yes, if the Japanese can configure it on Mac's OS, than there should be someone able to know how it's done and assign an extra button for another language right?

I was hoping here, but it seems no one has computer hacking skillz xD


one key for one language→ mac - callmedodge - 2012-06-22

You`d have to find the driver file for the keyboard and then find out how to edit that. I`m assuming you can do it on XCode, but I have no skills on this front.

My brother might be up for the challenge. He runs a Macbook himself so I`ll ask him.


one key for one language→ mac - radical_tyro - 2012-06-22

i also regularly have to cycle through 4 different keyboard layouts and it's a pain to not have have a single shortcut for each one. it might be possible using a keyboard shortcut program together with applescripts.


one key for one language→ mac - jmignot - 2012-06-23

Same on iPhone/Pad if you happen to use the keyboard for different languages…


one key for one language→ mac - jmignot - 2012-06-23

There is some information here:
http://tinyurl.com/switch-osx-keyboard
It should then be possible to assign a shortcut to the AppleScript.
However, I tested it manually and it seems to work… except for Japanese:
If I use it to query the current keyboard type when "hiragana" or "katakana" is preselected, it returns "US" whatsoever (or in my case "French", which is the option I select within in the kotoeri preferences in order to be able to use my French "azerty" keyboard). There I am stuck.

So it seems to be a good start but someone should find out how to make it applicable to Japanese too…


one key for one language→ mac - radical_tyro - 2012-06-26

i was able to get this working thanks to the page jmignot posted. the end result meets all my desires. here's how:

- go to http://tinyurl.com/switch-osx-keyboard and save the objective C code. the applescript works too but is too slow for me.
- edit the code as the first poster said there so that the japanese layout returns something other than your non-japanese layout: change TISCopyCurrentKeyboardLayoutInputSource to TISCopyCurrentKeyboardInputSource
- compile according to the instructions
- manually switch to each input method you want to set hotkeys for and run the changeInput program from the command line; it spits out the keyboard names.
- now just configure your favorite hotkey app to call /fullPath/changeInput "keyboard name". I used Quicksilver and found that even though you can do it directly with the Terminal plugin, it always brings the terminal app to the front which is not desirable. In my case I made bash scripts to call changeInput with each keyboard name:
#!/bin/sh
/fullPath/changeInput "keyboard name";
and save this to keyboard1.sh, and repeat for other keyboards. Now just set the Quicksilver triggers to launch those scripts. voila!


one key for one language→ mac - Blahah - 2012-07-09

This should be a fairly simple program to write if it's only for OS X. Attempting it now...


one key for one language→ mac - shinsen - 2012-07-09

I don't use Chinese but maybe this will help
http://support.apple.com/kb/HT3560


one key for one language→ mac - Khakionion - 2012-07-19

How specific are you wanting to get? Do you want to be able to hit something weird like CapsLock or Command...or is it fine to hit things like F1-F12, and Command+1 and the like?


one key for one language→ mac - Mesqueeb - 2012-07-21

Blahah Wrote:This should be a fairly simple program to write if it's only for OS X. Attempting it now...
Blahah, that'd be great! I'd love to hear about it if you've drafted something up. ^^


one key for one language→ mac - Mesqueeb - 2012-07-21

radical_tyro Wrote:i was able to get this working thanks to the page jmignot posted. the end result meets all my desires. here's how:

- go to http://tinyurl.com/switch-osx-keyboard and save the objective C code. the applescript works too but is too slow for me.
- edit the code as the first poster said there so that the japanese layout returns something other than your non-japanese layout: change TISCopyCurrentKeyboardLayoutInputSource to TISCopyCurrentKeyboardInputSource
- compile according to the instructions
- manually switch to each input method you want to set hotkeys for and run the changeInput program from the command line; it spits out the keyboard names.
- now just configure your favorite hotkey app to call /fullPath/changeInput "keyboard name". I used Quicksilver and found that even though you can do it directly with the Terminal plugin, it always brings the terminal app to the front which is not desirable. In my case I made bash scripts to call changeInput with each keyboard name:
#!/bin/sh
/fullPath/changeInput "keyboard name";
and save this to keyboard1.sh, and repeat for other keyboards. Now just set the Quicksilver triggers to launch those scripts. voila!
What exactly means the objective C code that I must save? ^^

Maybe if someone was able to do this for traditional pinyin, could they share the script here?


one key for one language→ mac - Khakionion - 2012-07-21

I'm almost done whipping up a nice GUI version that uses hot keys and everything:

http://id.khakionion.com/img/OKOLPreview2.png

I'm busy this week, so I'll try to finish this up the week after. I'll share it with this forum when I'm done.


one key for one language→ mac - Mesqueeb - 2012-07-23

Thanks man! You'll be making my dream come true!
Can't wait until it's done!! <3


one key for one language→ mac - Onara - 2012-07-25

Ugh... I run into this problem a lot.
I find myself shuffling between languages all the time:

Swedish (my native tongue) to write to my friends back home, posting on Swedish forums and to write personal stuff.

English to write to college friends and on English-speaking forums.

Farsi to chat with my parents. I guess I could just use Swedish but I like to give them a break sometimes lol. <3

And obviously Japanese when I am studying, jotting down kanjis or googling some...stuff. LOL.

Phew. Big Grin


one key for one language→ mac - Tori-kun - 2012-07-25

@Khakionion

Cool, can you port it to Win32, too? Confused Would be awesome Big Grin


one key for one language→ mac - Khakionion - 2012-10-04

Okay, I've produced a finished, polished version. You can download the source for free from Github, or drop $0.99 on it via the Mac App Store:

http://khaka.tk/singleshot

https://github.com/khakionion/onekeyonelanguage

./Michael


one key for one language→ mac - Mesqueeb - 2012-10-06

Khakionion Wrote:Okay, I've produced a finished, polished version. You can download the source for free from Github, or drop $0.99 on it via the Mac App Store:

http://khaka.tk/singleshot

https://github.com/khakionion/onekeyonelanguage

./Michael
3 questions before I purchase this product:

・Can I set different languages to different keys? Because with the beta I could only set one.
・If not, can I install the program 3 times for three languages?
・Can I assign keys like Caps Lock and option?


one key for one language→ mac - Khakionion - 2012-10-06

- Nope, that's one of my goals for an upcoming update. (Didn't get any beta feedback, didn't know how important that was/wasn't. Wink )
- Hmm, cool idea. I just tried it and it worked once, then stopped working. (I'll see if there are any quick fixes to make that work.)
- Nope, that's one of my goals for an upcoming update. Smile

(it's worth pointing out that purchases via the Mac App Store get all future updates for free)

I'm off to Japan for a couple of weeks on vacation, so I'll be working on it later this month. Cheers!