21
13

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

macOS High Sierra / Mojave / Catalina で 日本語モード時に スペース <-> 半角 入れ替え

Last updated at Posted at 2017-09-27
csrutil status
System Integrity Protection status: enabled.

command+R起動してからTerminal

csrutil disable
reboot

Catalinaの場合はこれも必要
どうも Catalina はシステム領域をSIP+R/Oでマウントしているようだ

sudo mount -uw /
sudo vi "/System/Library/Input Methods/JapaneseIM.app/Contents/PlugIns/JapaneseIM.appex/Contents/Resources/KeySetting_Default.plist"
--- /System/Library/Input Methods/JapaneseIM.app/Contents/PlugIns/JapaneseIM.appex/Contents/Resources/KeySetting_Default.plist.orig	2017-09-26 10:34:40.000000000 +0900
+++ /System/Library/Input Methods/JapaneseIM.app/Contents/PlugIns/JapaneseIM.appex/Contents/Resources/KeySetting_Default.plist	2017-09-26 10:38:30.000000000 +0900
@@ -11,12 +11,16 @@
 			<key>&apos; &apos;</key>
 			<dict>
 				<key>command</key>
-				<string>contextual_space</string>
+				<string>direct_input</string>
+				<key>character</key>
+				<string> </string>
 			</dict>
 			<key>shift+&apos; &apos;</key>
 			<dict>
 				<key>command</key>
-				<string>contextual_space_reverse</string>
+				<string>direct_input</string>
+				<key>character</key>
+				<string> </string>
 			</dict>
 			<key>delete:</key>
 			<dict>
killall JapaneseIM

入力をどこでもいいのので望み通りの動きか確かめて再起動

command+R起動してからTerminal

csrutil enable
reboot

contextual_space_reverse / contextual_space を有効活用したかったが、スペース連打すると半角スペース -> 全角スペース と交互に繰り返したりでうまくいかなかったのでベタ書き

Mojaveでも手順は一緒でした

21
13
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
21
13

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?