Skip to content

Commit 5545743

Browse files
committed
Update README.md
1 parent 559419d commit 5545743

File tree

4 files changed

+24
-2
lines changed

4 files changed

+24
-2
lines changed

KeyHolder.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |s|
22
s.name = "KeyHolder"
33
s.version = "0.0.1"
4-
s.summary = "Record shortcuts TextField in macOS."
4+
s.summary = "Record shortcuts in macOS, like Alfred app."
55
s.license = { :type => 'MIT', :file => 'LICENSE' }
66
s.homepage = "https://github.com/Clipy/KeyHolder"
77
s.author = { "Econa77" => "[email protected]" }

README.md

+23-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
[![Release version](https://img.shields.io/github/release/Clipy/KeyHolder.svg)](https://github.com/Clipy/KeyHolder/releases)
33
[![License: MIT](https://img.shields.io/github/license/Clipy/KeyHolder.svg)](https://github.com/Clipy/KeyHolder/blob/master/LICENSE)
44

5-
Record shortcuts TextField in macOS. Written by swift.
5+
Record shortcuts in macOS, like Alfred App.
6+
7+
<img src="./Screenshots/double_tap_shortcut.png" width="300">
8+
<img src="./Screenshots/normal_shortcut.png" width="300">
69

710
## Usage
811
```
@@ -13,6 +16,25 @@ pod 'KeyHolder', :git => 'https://github.com/Clipy/KeyHolder.git'
1316
```
1417

1518
## Example
19+
Set default key combo.
20+
```
21+
let recordView = RecordView(frame: CGRect.zero)
22+
recordView.tintColor = NSColor(red: 0.164, green: 0.517, blue: 0.823, alpha: 1)
23+
let keyCombo = KeyCombo(doubledModifiers: .CommandKeyMask)
24+
recordView.keyCombo = keyCombo
25+
```
26+
27+
Some delegate methods
28+
```
29+
func recordViewShouldBeginRecording(recordView: RecordView) -> Bool
30+
func recordView(recordView: RecordView, canRecordShortcut keyCombo: KeyCombo) -> Bool
31+
func recordViewDidClearShortcut(recordView: RecordView)
32+
func recordViewDidEndRecording(recordView: RecordView)
33+
```
34+
35+
## Dependencies
36+
The source code is dependent on hotkey library.
37+
- [Magnet](https://github.com/Clipy/Magnet)
1638

1739
### Contributing
1840
1. Fork it ( https://github.com/Clipy/KeyHolder/fork )

Screenshots/double_tap_shortcut.png

14 KB
Loading

Screenshots/normal_shortcut.png

12.7 KB
Loading

0 commit comments

Comments
 (0)