Skip to content

Commit

Permalink
Add a workaround for AquaSKK and Microsoft PowerPoint
Browse files Browse the repository at this point in the history
  • Loading branch information
zalt50 committed Jul 11, 2017
1 parent c0eefa6 commit 62e9574
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
10 changes: 10 additions & 0 deletions scripts/erb2json.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ def frontmost_application(type, app_alias)
'^org\.macports\.X11$',
]

microsoft_powerpoint_bundle_identifiers = [
'^com\.microsoft\.Powerpoint',
]

case app_alias
when 'terminal'
data = {
Expand Down Expand Up @@ -120,6 +124,12 @@ def frontmost_application(type, app_alias)
'bundle_identifiers' => vi_bundle_identifiers,
}
JSON.generate(data)
when 'aquaskk_workaround'
data = {
'type' => type,
'bundle_identifiers' => microsoft_powerpoint_bundle_identifiers,
}
JSON.generate(data)
else
''
end
Expand Down
1 change: 1 addition & 0 deletions src/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
<%= file_import_panel("docs/json/exchange_semicolon_and_colon.json") %>
<%= file_import_panel("docs/json/ctrl_command_fn_letter_specials.json") %>
<%= file_import_panel("docs/json/command_arrows_to_option_arrows.json") %>
<%= file_import_panel("docs/json/aquaskk_workaround.json") %>

<!-- For specific languages -->
<%= file_import_panel("docs/json/japanese.json") %>
Expand Down
16 changes: 16 additions & 0 deletions src/json/aquaskk_workaround.json.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"title": "AquaSKK workaround",
"rules": [
{
"description": "Change control+j to かな & 英数 in Microsoft PowerPoint.",
"manipulators": [
{
"type": "basic",
"from": <%= from("j", ["control"], ["caps_lock", "shift", "option"]) %>,
"to": <%= to([["japanese_eisuu"], ["japanese_kana"]]) %>,
"conditions": [ <%= frontmost_application_if("aquaskk_workaround") %> ]
}
]
}
]
}

1 comment on commit 62e9574

@zalt50
Copy link
Owner Author

@zalt50 zalt50 commented on 62e9574 Jul 11, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Workaround for codefirst/aquaskk#49

Please sign in to comment.