keyremac 0.0.2.1 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e396e7b7adb1000fc741d5c0e9523d4f85c2770c
4
- data.tar.gz: 8a6a3dbc853f7e6e6610dd5aa83845f0b24d25a8
3
+ metadata.gz: 2167e8a68606b216d7efc8fd3f2932471b07ccc4
4
+ data.tar.gz: 6ba94681d0bc6190b71454b6aa105d35060d1d43
5
5
  SHA512:
6
- metadata.gz: 34b2966dc0dc2d735ff6dbeb17870c24464503493872d02a09278b15ada32812fa8703df1c2239f3d0d6c3f678ce330e1add475fb64bdce5a5aaedd57e892255
7
- data.tar.gz: c08e1f5d867974e8f11cdea777aad2b7051884da4b3b999c1258f1f7d5029f6bf717b8a0c2eb2f6769add8f4f3718852f0e5530424f9cd44642b11a5f52da700
6
+ metadata.gz: 3919ca3770e3e6259b6e3ebd749823af149fb609797e50ca0340c72180d31dc4fd84972fc995f9eaa48adfec6cd62a09d379b700b2140d41f4a982f3203851c6
7
+ data.tar.gz: 3dbb44dd4db95e61fb0b9ef4a0ce547749a56fc69fd04536a66fb1acd25fd9e0e73e64c6449e2d6d75760dfc342067cee5050edf321ff1c28ef93b861dda86a3
data/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # Keyremac
2
2
 
3
3
  [![Build Status](https://travis-ci.org/keqh/keyremac.png?branch=master)](https://travis-ci.org/keqh/keyremac)
4
+ [![Code Climate](https://codeclimate.com/github/keqh/keyremac.png)](https://codeclimate.com/github/keqh/keyremac)
4
5
 
5
6
  Keyremac is KeyRemap4MacBook settings generator.
6
7
 
data/lib/keyremac.rb CHANGED
@@ -20,8 +20,8 @@ module Keyremac
20
20
  result
21
21
  end
22
22
 
23
- CLI_PATH = '/Applications/KeyRemap4MacBook.app/Contents/Applications/KeyRemap4MacBook_cli.app/Contents/MacOS/KeyRemap4MacBook_cli'
24
- DEFAULT_SETTINGS_PATH = '~/Library/Application Support/KeyRemap4MacBook/private.xml'
23
+ CLI_PATH = '/Applications/Karabiner.app/Contents/Library/bin/karabiner'
24
+ DEFAULT_SETTINGS_PATH = '~/Library/Application Support/Karabiner/private.xml'
25
25
 
26
26
  def self.reload
27
27
  File.write File.expand_path(DEFAULT_SETTINGS_PATH), get_root.dump
@@ -37,7 +37,6 @@ module Keyremac
37
37
  op.on('--dump', 'dump private.xml') { Keyremac::dump }
38
38
  op.on('--reload', 'reload private.xml') { Keyremac::reload }
39
39
  op.on('--ids', 'collect identifiers') { puts Keyremac::collect_identifiers }
40
- op.on('--test', 'test') { `touch ~/test.txt` }
41
40
  }.parse!(ARGV.dup)
42
41
  end
43
42
  end
@@ -1,3 +1,3 @@
1
1
  module Keyremac
2
- VERSION = "0.0.2.1"
2
+ VERSION = "1.0.0"
3
3
  end
data/samples/sample.rb CHANGED
@@ -1,4 +1,6 @@
1
- #!/usr/bin/env ruby -I ../lib -I lib
1
+ lib = File.expand_path('../../lib', __FILE__)
2
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
+
2
4
  require 'keyremac'
3
5
 
4
6
  item_ do
@@ -14,6 +16,7 @@ end
14
16
  ';' .to '_'
15
17
  '_' .to ';'
16
18
 
19
+ # 外部キーボード用
17
20
  :F7 .to :MUSIC_PREV
18
21
  :F8 .to :MUSIC_PLAY
19
22
  :F9 .to :MUSIC_NEXT
@@ -23,12 +26,18 @@ end
23
26
 
24
27
  :JIS_EISUU .overlaid :COMMAND_L
25
28
  :CONTROL_L .overlaid :CONTROL_L, keys: [:JIS_EISUU, :ESCAPE]
29
+ :CONTROL_R .overlaid :CONTROL_L, keys: [:JIS_EISUU, :ESCAPE]
26
30
  :SPACE .overlaid :SHIFT_L, repeat: true
27
31
 
28
32
  :m.cmd .to :VK_NONE # disable_minimize
29
- :j.ctrl .to :JIS_KANA # "Google IME"
33
+ :j.ctrl.none .to :JIS_KANA # "Google IME"
30
34
  :JIS_KANA .to :RETURN
31
35
  :COMMAND_L .to :OPTION_L
36
+ # :COMMAND_L .overlaid :OPTION_L, keys: [:JIS_KANA]
37
+ :TAB.opt .to :TAB.cmd
38
+
39
+ # GTDtool用
40
+ :COMMAND_R .to :COMMAND_R.ctrl.shift
32
41
 
33
42
  # extra1
34
43
  :SHIFT_L.cmd .to :SHIFT_L.cmd
@@ -43,35 +52,36 @@ end
43
52
  :b.ctrl.none .to :CURSOR_LEFT
44
53
  :f.ctrl.none .to :CURSOR_RIGHT
45
54
 
55
+ # ctrl-hはいつどんなときでもbackspace
56
+ :h.ctrl.none .to :DELETE
57
+
58
+
46
59
  app 'TERMINAL' do
47
- "pnco".chars { |c| c.extra1 .to :JIS_EISUU, :t.ctrl, c }
60
+ "pn".chars { |c| c.extra1 .to :JIS_EISUU, :t.ctrl, c }
61
+ "co".chars { |c| c.extra1 .to :JIS_EISUU, :t.ctrl, c }
48
62
  "jkl" .chars { |c| c.extra1 .to :JIS_EISUU, :t.ctrl, c }
49
63
  "du" .chars { |c| c.extra1 .to :t.ctrl, '['.ctrl, c.ctrl }
50
64
  end
51
65
 
52
- appdef_ do
53
- appname_ "SUBLIME"
54
- equal_ "com.sublimetext.3"
55
- equal_ "com.sublimetext.2"
66
+ app "SUBLIMETEXT" do
67
+ ".".extra1 .to *("->".chars)
68
+ ",".extra1 .to *("<-".chars)
69
+ "_".extra1 .to *("::".chars)
56
70
  end
57
71
 
58
- ['SUBLIME', 'GOOGLE_CHROME'].each { |app_name|
59
- app app_name do
60
- :p.extra1 .to :JIS_EISUU, '['.cmd.shift
61
- :n.extra1 .to :JIS_EISUU, ']'.cmd.shift
62
- end
63
- }
64
-
65
- app 'SUBLIME', inputsource: 'JAPANESE' do
72
+ app 'SUBLIMETEXT', inputsource: 'JAPANESE' do
66
73
  :TAB .to :i.ctrl
67
74
  end
68
75
 
69
- # item do
70
- # autogen_ "__KeyToKey__ KeyCode::Q, KeyCode::VK_OPEN_URL_SCRIPT_test"
71
- # end
72
-
73
- # vkopenurldef_ do
74
- # name_ "KeyCode::VK_OPEN_URL_SCRIPT_test"
75
- # url_ "file:///Users/keqh/Dropbox/personal/projects/KEYnoe/keyremac/samples/sample.rb --test"
76
- # end
76
+ item_ do
77
+ name_ 'focus_tab'
78
+ identifier_ 'private.focus_tab'
79
+ not_ 'TERMINAL'
80
+ # タブの移動
81
+ :p.extra1 .to :JIS_EISUU, '['.cmd.shift
82
+ :n.extra1 .to :JIS_EISUU, ']'.cmd.shift
83
+ end
77
84
 
85
+ app 'XCODE' do
86
+ :s.opt .to :JIS_EISUU, :o.cmd.shift, '.', 's', 't', 'o', 'r', 'y', :RETURN
87
+ end
metadata CHANGED
@@ -1,55 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: keyremac
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2.1
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - keqh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-06-27 00:00:00.000000000 Z
11
+ date: 2014-12-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.3'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: builder
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  description: KeyRemap4MacBook private.xml generator
@@ -59,8 +59,8 @@ executables: []
59
59
  extensions: []
60
60
  extra_rdoc_files: []
61
61
  files:
62
- - .gitignore
63
- - .travis.yml
62
+ - ".gitignore"
63
+ - ".travis.yml"
64
64
  - Gemfile
65
65
  - LICENSE.txt
66
66
  - README.ja.md
@@ -86,21 +86,20 @@ require_paths:
86
86
  - lib
87
87
  required_ruby_version: !ruby/object:Gem::Requirement
88
88
  requirements:
89
- - - '>='
89
+ - - ">="
90
90
  - !ruby/object:Gem::Version
91
91
  version: '0'
92
92
  required_rubygems_version: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - '>='
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  requirements: []
98
98
  rubyforge_project:
99
- rubygems_version: 2.0.2
99
+ rubygems_version: 2.2.2
100
100
  signing_key:
101
101
  specification_version: 4
102
102
  summary: KeyRemap4MacBook private.xml generator
103
103
  test_files:
104
104
  - spec/dump_spec.rb
105
105
  - spec/keyremac_spec.rb
106
- has_rdoc: