├── .gitignore ├── LICENSE ├── README.md ├── WriteTyper ├── WriteTyper.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata ├── WriteTyper │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── icon_128x128.png │ │ │ ├── icon_128x128@2x.png │ │ │ ├── icon_16x16.png │ │ │ ├── icon_16x16@2x.png │ │ │ ├── icon_256x256.png │ │ │ ├── icon_256x256@2x.png │ │ │ ├── icon_32x32.png │ │ │ ├── icon_32x32@2x.png │ │ │ ├── icon_512x512.png │ │ │ └── icon_512x512@2x.png │ │ ├── Contents.json │ │ ├── qrcode.imageset │ │ │ ├── Contents.json │ │ │ └── qrcode.png │ │ ├── shutdown.imageset │ │ │ ├── Contents.json │ │ │ └── shutdown.png │ │ ├── typewriter.imageset │ │ │ ├── Contents.json │ │ │ └── typewriter@2x.png │ │ └── wechat.imageset │ │ │ ├── Contents.json │ │ │ └── wechat.png │ ├── Base.lproj │ │ └── Main.storyboard │ ├── Info.plist │ ├── SettingViewController.swift │ ├── SettingViewController.xib │ └── sounds │ │ ├── backspace.mp3 │ │ ├── key-01.mp3 │ │ ├── key-02.mp3 │ │ ├── key-03.mp3 │ │ ├── key-04.mp3 │ │ ├── key-new-01.mp3 │ │ ├── key-new-02.mp3 │ │ ├── key-new-03.mp3 │ │ ├── key-new-04.mp3 │ │ ├── key-new-05.mp3 │ │ ├── return-new.mp3 │ │ ├── return.mp3 │ │ ├── scrollDown.mp3 │ │ ├── scrollUp.mp3 │ │ ├── space-new.mp3 │ │ └── space.mp3 ├── WriteTyperTests │ ├── Info.plist │ └── NoisyTyperTests.swift └── WriteTyperUITests │ ├── Info.plist │ └── NoisyTyperUITests.swift └── screenshot ├── app.png └── home.png /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | build/ 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | xcuserdata 13 | *.xccheckout 14 | *.moved-aside 15 | DerivedData 16 | *.hmap 17 | *.ipa 18 | *.xcuserstate 19 | 20 | # CocoaPods 21 | # 22 | # We recommend against adding the Pods directory to your .gitignore. However 23 | # you should judge for yourself, the pros and cons are mentioned at: 24 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 25 | # 26 | # Pods/ 27 | 28 | # Carthage 29 | # 30 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 31 | # Carthage/Checkouts 32 | 33 | Carthage/Build 34 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | 203 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # WriteTyper [![star this repo](http://github-svg-buttons.herokuapp.com/star.svg?user=Urinx&repo=WriteTyper&style=flat&background=1081C1)](http://github.com/Urinx/WriteTyper) [![fork this repo](http://github-svg-buttons.herokuapp.com/fork.svg?user=Urinx&repo=WriteTyper&style=flat&background=1081C1)](http://github.com/Urinx/WriteTyper/fork) [![license](https://img.shields.io/github/license/Urinx/WriteTyper.svg)](https://github.com/Urinx/WriteTyper/blob/master/LICENSE) ![platform](https://img.shields.io/badge/platform-osx-lightgrey.svg) [![download](https://img.shields.io/github/downloads/Urinx/WriteTyper/total.svg)](https://github.com/Urinx/WriteTyper/releases) 2 | 3 | 復古打字機 — Mac OS X App [官网](http://urinx.github.io/app/writetyper) 4 | 5 | ![home](./screenshot/home.png) 6 | 7 | ### About 8 | This WriteTyper app works on Mac OS X 10.10+, writen in `Swift 2.0`, based on NoisyTyper. It can make old typewriter sounds when you keypress, let you more enjoy the time of coding or writing. 9 | 10 | ### Install 11 | > It's very easy to install this app. 12 | > 13 | > Download the [app](https://github.com/Urinx/WriteTyper/releases), double click to run it. And then go to the System Preferences -> Security & Privacy, enable Accessibility for WriteTyper. At last, quit it and reopen. 14 | > 15 | > Notice: for it to work, Accessibility for WriteTyper must be enabled. 16 | 17 | ### Screenshot 18 | ![app](./screenshot/app.png) 19 | 20 | ### Thanks 21 | 22 | [gorlak / NoisyTyper](https://github.com/gorlak/NoisyTyper) 23 | -------------------------------------------------------------------------------- /WriteTyper/WriteTyper.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | BB0F4DBC1BA447A400B26E8E /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB0F4DBB1BA447A400B26E8E /* AppDelegate.swift */; }; 11 | BB0F4DC01BA447A400B26E8E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = BB0F4DBF1BA447A400B26E8E /* Assets.xcassets */; }; 12 | BB0F4DC31BA447A400B26E8E /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = BB0F4DC11BA447A400B26E8E /* Main.storyboard */; }; 13 | BB0F4DCE1BA447A400B26E8E /* NoisyTyperTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB0F4DCD1BA447A400B26E8E /* NoisyTyperTests.swift */; }; 14 | BB0F4DD91BA447A400B26E8E /* NoisyTyperUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB0F4DD81BA447A400B26E8E /* NoisyTyperUITests.swift */; }; 15 | BB33CBF41BA48A16005BBAB1 /* backspace.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = BB33CBE41BA48A16005BBAB1 /* backspace.mp3 */; }; 16 | BB33CBF51BA48A16005BBAB1 /* key-01.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = BB33CBE51BA48A16005BBAB1 /* key-01.mp3 */; }; 17 | BB33CBF61BA48A16005BBAB1 /* key-02.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = BB33CBE61BA48A16005BBAB1 /* key-02.mp3 */; }; 18 | BB33CBF71BA48A16005BBAB1 /* key-03.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = BB33CBE71BA48A16005BBAB1 /* key-03.mp3 */; }; 19 | BB33CBF81BA48A16005BBAB1 /* key-04.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = BB33CBE81BA48A16005BBAB1 /* key-04.mp3 */; }; 20 | BB33CBF91BA48A16005BBAB1 /* key-new-01.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = BB33CBE91BA48A16005BBAB1 /* key-new-01.mp3 */; }; 21 | BB33CBFA1BA48A16005BBAB1 /* key-new-02.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = BB33CBEA1BA48A16005BBAB1 /* key-new-02.mp3 */; }; 22 | BB33CBFB1BA48A16005BBAB1 /* key-new-03.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = BB33CBEB1BA48A16005BBAB1 /* key-new-03.mp3 */; }; 23 | BB33CBFC1BA48A16005BBAB1 /* key-new-04.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = BB33CBEC1BA48A16005BBAB1 /* key-new-04.mp3 */; }; 24 | BB33CBFD1BA48A16005BBAB1 /* key-new-05.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = BB33CBED1BA48A16005BBAB1 /* key-new-05.mp3 */; }; 25 | BB33CBFE1BA48A16005BBAB1 /* return-new.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = BB33CBEE1BA48A16005BBAB1 /* return-new.mp3 */; }; 26 | BB33CBFF1BA48A16005BBAB1 /* return.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = BB33CBEF1BA48A16005BBAB1 /* return.mp3 */; }; 27 | BB33CC001BA48A16005BBAB1 /* scrollDown.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = BB33CBF01BA48A16005BBAB1 /* scrollDown.mp3 */; }; 28 | BB33CC011BA48A16005BBAB1 /* scrollUp.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = BB33CBF11BA48A16005BBAB1 /* scrollUp.mp3 */; }; 29 | BB33CC021BA48A16005BBAB1 /* space-new.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = BB33CBF21BA48A16005BBAB1 /* space-new.mp3 */; }; 30 | BB33CC031BA48A16005BBAB1 /* space.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = BB33CBF31BA48A16005BBAB1 /* space.mp3 */; }; 31 | BB33CC061BA5063B005BBAB1 /* SettingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BB33CC041BA5063B005BBAB1 /* SettingViewController.swift */; }; 32 | BB33CC071BA5063B005BBAB1 /* SettingViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = BB33CC051BA5063B005BBAB1 /* SettingViewController.xib */; }; 33 | /* End PBXBuildFile section */ 34 | 35 | /* Begin PBXContainerItemProxy section */ 36 | BB0F4DCA1BA447A400B26E8E /* PBXContainerItemProxy */ = { 37 | isa = PBXContainerItemProxy; 38 | containerPortal = BB0F4DB01BA447A400B26E8E /* Project object */; 39 | proxyType = 1; 40 | remoteGlobalIDString = BB0F4DB71BA447A400B26E8E; 41 | remoteInfo = NoisyTyper; 42 | }; 43 | BB0F4DD51BA447A400B26E8E /* PBXContainerItemProxy */ = { 44 | isa = PBXContainerItemProxy; 45 | containerPortal = BB0F4DB01BA447A400B26E8E /* Project object */; 46 | proxyType = 1; 47 | remoteGlobalIDString = BB0F4DB71BA447A400B26E8E; 48 | remoteInfo = NoisyTyper; 49 | }; 50 | /* End PBXContainerItemProxy section */ 51 | 52 | /* Begin PBXFileReference section */ 53 | BB0F4DB81BA447A400B26E8E /* WriteTyper.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = WriteTyper.app; sourceTree = BUILT_PRODUCTS_DIR; }; 54 | BB0F4DBB1BA447A400B26E8E /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 55 | BB0F4DBF1BA447A400B26E8E /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 56 | BB0F4DC21BA447A400B26E8E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 57 | BB0F4DC41BA447A400B26E8E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 58 | BB0F4DC91BA447A400B26E8E /* WriteTyper.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = WriteTyper.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 59 | BB0F4DCD1BA447A400B26E8E /* NoisyTyperTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NoisyTyperTests.swift; sourceTree = ""; }; 60 | BB0F4DCF1BA447A400B26E8E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 61 | BB0F4DD41BA447A400B26E8E /* WriteTyper.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = WriteTyper.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 62 | BB0F4DD81BA447A400B26E8E /* NoisyTyperUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NoisyTyperUITests.swift; sourceTree = ""; }; 63 | BB0F4DDA1BA447A400B26E8E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 64 | BB33CBE41BA48A16005BBAB1 /* backspace.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = backspace.mp3; sourceTree = ""; }; 65 | BB33CBE51BA48A16005BBAB1 /* key-01.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = "key-01.mp3"; sourceTree = ""; }; 66 | BB33CBE61BA48A16005BBAB1 /* key-02.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = "key-02.mp3"; sourceTree = ""; }; 67 | BB33CBE71BA48A16005BBAB1 /* key-03.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = "key-03.mp3"; sourceTree = ""; }; 68 | BB33CBE81BA48A16005BBAB1 /* key-04.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = "key-04.mp3"; sourceTree = ""; }; 69 | BB33CBE91BA48A16005BBAB1 /* key-new-01.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = "key-new-01.mp3"; sourceTree = ""; }; 70 | BB33CBEA1BA48A16005BBAB1 /* key-new-02.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = "key-new-02.mp3"; sourceTree = ""; }; 71 | BB33CBEB1BA48A16005BBAB1 /* key-new-03.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = "key-new-03.mp3"; sourceTree = ""; }; 72 | BB33CBEC1BA48A16005BBAB1 /* key-new-04.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = "key-new-04.mp3"; sourceTree = ""; }; 73 | BB33CBED1BA48A16005BBAB1 /* key-new-05.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = "key-new-05.mp3"; sourceTree = ""; }; 74 | BB33CBEE1BA48A16005BBAB1 /* return-new.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = "return-new.mp3"; sourceTree = ""; }; 75 | BB33CBEF1BA48A16005BBAB1 /* return.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = return.mp3; sourceTree = ""; }; 76 | BB33CBF01BA48A16005BBAB1 /* scrollDown.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = scrollDown.mp3; sourceTree = ""; }; 77 | BB33CBF11BA48A16005BBAB1 /* scrollUp.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = scrollUp.mp3; sourceTree = ""; }; 78 | BB33CBF21BA48A16005BBAB1 /* space-new.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = "space-new.mp3"; sourceTree = ""; }; 79 | BB33CBF31BA48A16005BBAB1 /* space.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = space.mp3; sourceTree = ""; }; 80 | BB33CC041BA5063B005BBAB1 /* SettingViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SettingViewController.swift; sourceTree = ""; }; 81 | BB33CC051BA5063B005BBAB1 /* SettingViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = SettingViewController.xib; sourceTree = ""; }; 82 | /* End PBXFileReference section */ 83 | 84 | /* Begin PBXFrameworksBuildPhase section */ 85 | BB0F4DB51BA447A400B26E8E /* Frameworks */ = { 86 | isa = PBXFrameworksBuildPhase; 87 | buildActionMask = 2147483647; 88 | files = ( 89 | ); 90 | runOnlyForDeploymentPostprocessing = 0; 91 | }; 92 | BB0F4DC61BA447A400B26E8E /* Frameworks */ = { 93 | isa = PBXFrameworksBuildPhase; 94 | buildActionMask = 2147483647; 95 | files = ( 96 | ); 97 | runOnlyForDeploymentPostprocessing = 0; 98 | }; 99 | BB0F4DD11BA447A400B26E8E /* Frameworks */ = { 100 | isa = PBXFrameworksBuildPhase; 101 | buildActionMask = 2147483647; 102 | files = ( 103 | ); 104 | runOnlyForDeploymentPostprocessing = 0; 105 | }; 106 | /* End PBXFrameworksBuildPhase section */ 107 | 108 | /* Begin PBXGroup section */ 109 | BB0F4DAF1BA447A400B26E8E = { 110 | isa = PBXGroup; 111 | children = ( 112 | BB0F4DBA1BA447A400B26E8E /* WriteTyper */, 113 | BB0F4DCC1BA447A400B26E8E /* WriteTyperTests */, 114 | BB0F4DD71BA447A400B26E8E /* WriteTyperUITests */, 115 | BB0F4DB91BA447A400B26E8E /* Products */, 116 | ); 117 | sourceTree = ""; 118 | }; 119 | BB0F4DB91BA447A400B26E8E /* Products */ = { 120 | isa = PBXGroup; 121 | children = ( 122 | BB0F4DB81BA447A400B26E8E /* WriteTyper.app */, 123 | BB0F4DC91BA447A400B26E8E /* WriteTyper.xctest */, 124 | BB0F4DD41BA447A400B26E8E /* WriteTyper.xctest */, 125 | ); 126 | name = Products; 127 | sourceTree = ""; 128 | }; 129 | BB0F4DBA1BA447A400B26E8E /* WriteTyper */ = { 130 | isa = PBXGroup; 131 | children = ( 132 | BB0F4DBB1BA447A400B26E8E /* AppDelegate.swift */, 133 | BB0F4DBF1BA447A400B26E8E /* Assets.xcassets */, 134 | BB0F4DC11BA447A400B26E8E /* Main.storyboard */, 135 | BB0F4DC41BA447A400B26E8E /* Info.plist */, 136 | BB33CBE31BA48A16005BBAB1 /* sounds */, 137 | BB33CC041BA5063B005BBAB1 /* SettingViewController.swift */, 138 | BB33CC051BA5063B005BBAB1 /* SettingViewController.xib */, 139 | ); 140 | path = WriteTyper; 141 | sourceTree = ""; 142 | }; 143 | BB0F4DCC1BA447A400B26E8E /* WriteTyperTests */ = { 144 | isa = PBXGroup; 145 | children = ( 146 | BB0F4DCD1BA447A400B26E8E /* NoisyTyperTests.swift */, 147 | BB0F4DCF1BA447A400B26E8E /* Info.plist */, 148 | ); 149 | path = WriteTyperTests; 150 | sourceTree = ""; 151 | }; 152 | BB0F4DD71BA447A400B26E8E /* WriteTyperUITests */ = { 153 | isa = PBXGroup; 154 | children = ( 155 | BB0F4DD81BA447A400B26E8E /* NoisyTyperUITests.swift */, 156 | BB0F4DDA1BA447A400B26E8E /* Info.plist */, 157 | ); 158 | path = WriteTyperUITests; 159 | sourceTree = ""; 160 | }; 161 | BB33CBE31BA48A16005BBAB1 /* sounds */ = { 162 | isa = PBXGroup; 163 | children = ( 164 | BB33CBE41BA48A16005BBAB1 /* backspace.mp3 */, 165 | BB33CBE51BA48A16005BBAB1 /* key-01.mp3 */, 166 | BB33CBE61BA48A16005BBAB1 /* key-02.mp3 */, 167 | BB33CBE71BA48A16005BBAB1 /* key-03.mp3 */, 168 | BB33CBE81BA48A16005BBAB1 /* key-04.mp3 */, 169 | BB33CBE91BA48A16005BBAB1 /* key-new-01.mp3 */, 170 | BB33CBEA1BA48A16005BBAB1 /* key-new-02.mp3 */, 171 | BB33CBEB1BA48A16005BBAB1 /* key-new-03.mp3 */, 172 | BB33CBEC1BA48A16005BBAB1 /* key-new-04.mp3 */, 173 | BB33CBED1BA48A16005BBAB1 /* key-new-05.mp3 */, 174 | BB33CBEE1BA48A16005BBAB1 /* return-new.mp3 */, 175 | BB33CBEF1BA48A16005BBAB1 /* return.mp3 */, 176 | BB33CBF01BA48A16005BBAB1 /* scrollDown.mp3 */, 177 | BB33CBF11BA48A16005BBAB1 /* scrollUp.mp3 */, 178 | BB33CBF21BA48A16005BBAB1 /* space-new.mp3 */, 179 | BB33CBF31BA48A16005BBAB1 /* space.mp3 */, 180 | ); 181 | path = sounds; 182 | sourceTree = ""; 183 | }; 184 | /* End PBXGroup section */ 185 | 186 | /* Begin PBXNativeTarget section */ 187 | BB0F4DB71BA447A400B26E8E /* WriteTyper */ = { 188 | isa = PBXNativeTarget; 189 | buildConfigurationList = BB0F4DDD1BA447A400B26E8E /* Build configuration list for PBXNativeTarget "WriteTyper" */; 190 | buildPhases = ( 191 | BB0F4DB41BA447A400B26E8E /* Sources */, 192 | BB0F4DB51BA447A400B26E8E /* Frameworks */, 193 | BB0F4DB61BA447A400B26E8E /* Resources */, 194 | ); 195 | buildRules = ( 196 | ); 197 | dependencies = ( 198 | ); 199 | name = WriteTyper; 200 | productName = NoisyTyper; 201 | productReference = BB0F4DB81BA447A400B26E8E /* WriteTyper.app */; 202 | productType = "com.apple.product-type.application"; 203 | }; 204 | BB0F4DC81BA447A400B26E8E /* WriteTyperTests */ = { 205 | isa = PBXNativeTarget; 206 | buildConfigurationList = BB0F4DE01BA447A400B26E8E /* Build configuration list for PBXNativeTarget "WriteTyperTests" */; 207 | buildPhases = ( 208 | BB0F4DC51BA447A400B26E8E /* Sources */, 209 | BB0F4DC61BA447A400B26E8E /* Frameworks */, 210 | BB0F4DC71BA447A400B26E8E /* Resources */, 211 | ); 212 | buildRules = ( 213 | ); 214 | dependencies = ( 215 | BB0F4DCB1BA447A400B26E8E /* PBXTargetDependency */, 216 | ); 217 | name = WriteTyperTests; 218 | productName = NoisyTyperTests; 219 | productReference = BB0F4DC91BA447A400B26E8E /* WriteTyper.xctest */; 220 | productType = "com.apple.product-type.bundle.unit-test"; 221 | }; 222 | BB0F4DD31BA447A400B26E8E /* WriteTyperUITests */ = { 223 | isa = PBXNativeTarget; 224 | buildConfigurationList = BB0F4DE31BA447A400B26E8E /* Build configuration list for PBXNativeTarget "WriteTyperUITests" */; 225 | buildPhases = ( 226 | BB0F4DD01BA447A400B26E8E /* Sources */, 227 | BB0F4DD11BA447A400B26E8E /* Frameworks */, 228 | BB0F4DD21BA447A400B26E8E /* Resources */, 229 | ); 230 | buildRules = ( 231 | ); 232 | dependencies = ( 233 | BB0F4DD61BA447A400B26E8E /* PBXTargetDependency */, 234 | ); 235 | name = WriteTyperUITests; 236 | productName = NoisyTyperUITests; 237 | productReference = BB0F4DD41BA447A400B26E8E /* WriteTyper.xctest */; 238 | productType = "com.apple.product-type.bundle.ui-testing"; 239 | }; 240 | /* End PBXNativeTarget section */ 241 | 242 | /* Begin PBXProject section */ 243 | BB0F4DB01BA447A400B26E8E /* Project object */ = { 244 | isa = PBXProject; 245 | attributes = { 246 | LastUpgradeCheck = 0710; 247 | ORGANIZATIONNAME = Eular; 248 | TargetAttributes = { 249 | BB0F4DB71BA447A400B26E8E = { 250 | CreatedOnToolsVersion = 7.1; 251 | DevelopmentTeam = 952J324HNJ; 252 | }; 253 | BB0F4DC81BA447A400B26E8E = { 254 | CreatedOnToolsVersion = 7.1; 255 | TestTargetID = BB0F4DB71BA447A400B26E8E; 256 | }; 257 | BB0F4DD31BA447A400B26E8E = { 258 | CreatedOnToolsVersion = 7.1; 259 | TestTargetID = BB0F4DB71BA447A400B26E8E; 260 | }; 261 | }; 262 | }; 263 | buildConfigurationList = BB0F4DB31BA447A400B26E8E /* Build configuration list for PBXProject "WriteTyper" */; 264 | compatibilityVersion = "Xcode 3.2"; 265 | developmentRegion = English; 266 | hasScannedForEncodings = 0; 267 | knownRegions = ( 268 | en, 269 | Base, 270 | ); 271 | mainGroup = BB0F4DAF1BA447A400B26E8E; 272 | productRefGroup = BB0F4DB91BA447A400B26E8E /* Products */; 273 | projectDirPath = ""; 274 | projectRoot = ""; 275 | targets = ( 276 | BB0F4DB71BA447A400B26E8E /* WriteTyper */, 277 | BB0F4DC81BA447A400B26E8E /* WriteTyperTests */, 278 | BB0F4DD31BA447A400B26E8E /* WriteTyperUITests */, 279 | ); 280 | }; 281 | /* End PBXProject section */ 282 | 283 | /* Begin PBXResourcesBuildPhase section */ 284 | BB0F4DB61BA447A400B26E8E /* Resources */ = { 285 | isa = PBXResourcesBuildPhase; 286 | buildActionMask = 2147483647; 287 | files = ( 288 | BB33CBF61BA48A16005BBAB1 /* key-02.mp3 in Resources */, 289 | BB33CC031BA48A16005BBAB1 /* space.mp3 in Resources */, 290 | BB33CC001BA48A16005BBAB1 /* scrollDown.mp3 in Resources */, 291 | BB33CBF71BA48A16005BBAB1 /* key-03.mp3 in Resources */, 292 | BB33CBFB1BA48A16005BBAB1 /* key-new-03.mp3 in Resources */, 293 | BB33CBF91BA48A16005BBAB1 /* key-new-01.mp3 in Resources */, 294 | BB33CBFA1BA48A16005BBAB1 /* key-new-02.mp3 in Resources */, 295 | BB33CBFC1BA48A16005BBAB1 /* key-new-04.mp3 in Resources */, 296 | BB33CC021BA48A16005BBAB1 /* space-new.mp3 in Resources */, 297 | BB33CBFD1BA48A16005BBAB1 /* key-new-05.mp3 in Resources */, 298 | BB33CBF81BA48A16005BBAB1 /* key-04.mp3 in Resources */, 299 | BB0F4DC01BA447A400B26E8E /* Assets.xcassets in Resources */, 300 | BB0F4DC31BA447A400B26E8E /* Main.storyboard in Resources */, 301 | BB33CBFF1BA48A16005BBAB1 /* return.mp3 in Resources */, 302 | BB33CBF41BA48A16005BBAB1 /* backspace.mp3 in Resources */, 303 | BB33CC071BA5063B005BBAB1 /* SettingViewController.xib in Resources */, 304 | BB33CBFE1BA48A16005BBAB1 /* return-new.mp3 in Resources */, 305 | BB33CC011BA48A16005BBAB1 /* scrollUp.mp3 in Resources */, 306 | BB33CBF51BA48A16005BBAB1 /* key-01.mp3 in Resources */, 307 | ); 308 | runOnlyForDeploymentPostprocessing = 0; 309 | }; 310 | BB0F4DC71BA447A400B26E8E /* Resources */ = { 311 | isa = PBXResourcesBuildPhase; 312 | buildActionMask = 2147483647; 313 | files = ( 314 | ); 315 | runOnlyForDeploymentPostprocessing = 0; 316 | }; 317 | BB0F4DD21BA447A400B26E8E /* Resources */ = { 318 | isa = PBXResourcesBuildPhase; 319 | buildActionMask = 2147483647; 320 | files = ( 321 | ); 322 | runOnlyForDeploymentPostprocessing = 0; 323 | }; 324 | /* End PBXResourcesBuildPhase section */ 325 | 326 | /* Begin PBXSourcesBuildPhase section */ 327 | BB0F4DB41BA447A400B26E8E /* Sources */ = { 328 | isa = PBXSourcesBuildPhase; 329 | buildActionMask = 2147483647; 330 | files = ( 331 | BB0F4DBC1BA447A400B26E8E /* AppDelegate.swift in Sources */, 332 | BB33CC061BA5063B005BBAB1 /* SettingViewController.swift in Sources */, 333 | ); 334 | runOnlyForDeploymentPostprocessing = 0; 335 | }; 336 | BB0F4DC51BA447A400B26E8E /* Sources */ = { 337 | isa = PBXSourcesBuildPhase; 338 | buildActionMask = 2147483647; 339 | files = ( 340 | BB0F4DCE1BA447A400B26E8E /* NoisyTyperTests.swift in Sources */, 341 | ); 342 | runOnlyForDeploymentPostprocessing = 0; 343 | }; 344 | BB0F4DD01BA447A400B26E8E /* Sources */ = { 345 | isa = PBXSourcesBuildPhase; 346 | buildActionMask = 2147483647; 347 | files = ( 348 | BB0F4DD91BA447A400B26E8E /* NoisyTyperUITests.swift in Sources */, 349 | ); 350 | runOnlyForDeploymentPostprocessing = 0; 351 | }; 352 | /* End PBXSourcesBuildPhase section */ 353 | 354 | /* Begin PBXTargetDependency section */ 355 | BB0F4DCB1BA447A400B26E8E /* PBXTargetDependency */ = { 356 | isa = PBXTargetDependency; 357 | target = BB0F4DB71BA447A400B26E8E /* WriteTyper */; 358 | targetProxy = BB0F4DCA1BA447A400B26E8E /* PBXContainerItemProxy */; 359 | }; 360 | BB0F4DD61BA447A400B26E8E /* PBXTargetDependency */ = { 361 | isa = PBXTargetDependency; 362 | target = BB0F4DB71BA447A400B26E8E /* WriteTyper */; 363 | targetProxy = BB0F4DD51BA447A400B26E8E /* PBXContainerItemProxy */; 364 | }; 365 | /* End PBXTargetDependency section */ 366 | 367 | /* Begin PBXVariantGroup section */ 368 | BB0F4DC11BA447A400B26E8E /* Main.storyboard */ = { 369 | isa = PBXVariantGroup; 370 | children = ( 371 | BB0F4DC21BA447A400B26E8E /* Base */, 372 | ); 373 | name = Main.storyboard; 374 | sourceTree = ""; 375 | }; 376 | /* End PBXVariantGroup section */ 377 | 378 | /* Begin XCBuildConfiguration section */ 379 | BB0F4DDB1BA447A400B26E8E /* Debug */ = { 380 | isa = XCBuildConfiguration; 381 | buildSettings = { 382 | ALWAYS_SEARCH_USER_PATHS = NO; 383 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 384 | CLANG_CXX_LIBRARY = "libc++"; 385 | CLANG_ENABLE_MODULES = YES; 386 | CLANG_ENABLE_OBJC_ARC = YES; 387 | CLANG_WARN_BOOL_CONVERSION = YES; 388 | CLANG_WARN_CONSTANT_CONVERSION = YES; 389 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 390 | CLANG_WARN_EMPTY_BODY = YES; 391 | CLANG_WARN_ENUM_CONVERSION = YES; 392 | CLANG_WARN_INT_CONVERSION = YES; 393 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 394 | CLANG_WARN_UNREACHABLE_CODE = YES; 395 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 396 | CODE_SIGN_IDENTITY = "-"; 397 | COPY_PHASE_STRIP = NO; 398 | DEBUG_INFORMATION_FORMAT = dwarf; 399 | ENABLE_STRICT_OBJC_MSGSEND = YES; 400 | ENABLE_TESTABILITY = YES; 401 | GCC_C_LANGUAGE_STANDARD = gnu99; 402 | GCC_DYNAMIC_NO_PIC = NO; 403 | GCC_NO_COMMON_BLOCKS = YES; 404 | GCC_OPTIMIZATION_LEVEL = 0; 405 | GCC_PREPROCESSOR_DEFINITIONS = ( 406 | "DEBUG=1", 407 | "$(inherited)", 408 | ); 409 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 410 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 411 | GCC_WARN_UNDECLARED_SELECTOR = YES; 412 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 413 | GCC_WARN_UNUSED_FUNCTION = YES; 414 | GCC_WARN_UNUSED_VARIABLE = YES; 415 | MACOSX_DEPLOYMENT_TARGET = 10.10; 416 | MTL_ENABLE_DEBUG_INFO = YES; 417 | ONLY_ACTIVE_ARCH = YES; 418 | SDKROOT = macosx; 419 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 420 | }; 421 | name = Debug; 422 | }; 423 | BB0F4DDC1BA447A400B26E8E /* Release */ = { 424 | isa = XCBuildConfiguration; 425 | buildSettings = { 426 | ALWAYS_SEARCH_USER_PATHS = NO; 427 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 428 | CLANG_CXX_LIBRARY = "libc++"; 429 | CLANG_ENABLE_MODULES = YES; 430 | CLANG_ENABLE_OBJC_ARC = YES; 431 | CLANG_WARN_BOOL_CONVERSION = YES; 432 | CLANG_WARN_CONSTANT_CONVERSION = YES; 433 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 434 | CLANG_WARN_EMPTY_BODY = YES; 435 | CLANG_WARN_ENUM_CONVERSION = YES; 436 | CLANG_WARN_INT_CONVERSION = YES; 437 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 438 | CLANG_WARN_UNREACHABLE_CODE = YES; 439 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 440 | CODE_SIGN_IDENTITY = "-"; 441 | COPY_PHASE_STRIP = NO; 442 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 443 | ENABLE_NS_ASSERTIONS = NO; 444 | ENABLE_STRICT_OBJC_MSGSEND = YES; 445 | GCC_C_LANGUAGE_STANDARD = gnu99; 446 | GCC_NO_COMMON_BLOCKS = YES; 447 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 448 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 449 | GCC_WARN_UNDECLARED_SELECTOR = YES; 450 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 451 | GCC_WARN_UNUSED_FUNCTION = YES; 452 | GCC_WARN_UNUSED_VARIABLE = YES; 453 | MACOSX_DEPLOYMENT_TARGET = 10.10; 454 | MTL_ENABLE_DEBUG_INFO = NO; 455 | SDKROOT = macosx; 456 | }; 457 | name = Release; 458 | }; 459 | BB0F4DDE1BA447A400B26E8E /* Debug */ = { 460 | isa = XCBuildConfiguration; 461 | buildSettings = { 462 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 463 | CODE_SIGN_IDENTITY = "Developer ID Application"; 464 | "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Mac Developer"; 465 | COMBINE_HIDPI_IMAGES = YES; 466 | INFOPLIST_FILE = WriteTyper/Info.plist; 467 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; 468 | PRODUCT_BUNDLE_IDENTIFIER = com.eular.WriteTyper; 469 | PRODUCT_NAME = WriteTyper; 470 | PROVISIONING_PROFILE = ""; 471 | }; 472 | name = Debug; 473 | }; 474 | BB0F4DDF1BA447A400B26E8E /* Release */ = { 475 | isa = XCBuildConfiguration; 476 | buildSettings = { 477 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 478 | CODE_SIGN_IDENTITY = "Developer ID Application"; 479 | "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Mac Developer"; 480 | COMBINE_HIDPI_IMAGES = YES; 481 | INFOPLIST_FILE = WriteTyper/Info.plist; 482 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; 483 | PRODUCT_BUNDLE_IDENTIFIER = com.eular.WriteTyper; 484 | PRODUCT_NAME = WriteTyper; 485 | PROVISIONING_PROFILE = ""; 486 | }; 487 | name = Release; 488 | }; 489 | BB0F4DE11BA447A400B26E8E /* Debug */ = { 490 | isa = XCBuildConfiguration; 491 | buildSettings = { 492 | BUNDLE_LOADER = "$(TEST_HOST)"; 493 | COMBINE_HIDPI_IMAGES = YES; 494 | INFOPLIST_FILE = WriteTyperTests/Info.plist; 495 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; 496 | PRODUCT_BUNDLE_IDENTIFIER = com.eular.WriteTyperTests; 497 | PRODUCT_NAME = WriteTyper; 498 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/WriteTyper.app/Contents/MacOS/WriteTyper"; 499 | }; 500 | name = Debug; 501 | }; 502 | BB0F4DE21BA447A400B26E8E /* Release */ = { 503 | isa = XCBuildConfiguration; 504 | buildSettings = { 505 | BUNDLE_LOADER = "$(TEST_HOST)"; 506 | COMBINE_HIDPI_IMAGES = YES; 507 | INFOPLIST_FILE = WriteTyperTests/Info.plist; 508 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; 509 | PRODUCT_BUNDLE_IDENTIFIER = com.eular.WriteTyperTests; 510 | PRODUCT_NAME = WriteTyper; 511 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/WriteTyper.app/Contents/MacOS/WriteTyper"; 512 | }; 513 | name = Release; 514 | }; 515 | BB0F4DE41BA447A400B26E8E /* Debug */ = { 516 | isa = XCBuildConfiguration; 517 | buildSettings = { 518 | COMBINE_HIDPI_IMAGES = YES; 519 | INFOPLIST_FILE = WriteTyperUITests/Info.plist; 520 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; 521 | PRODUCT_BUNDLE_IDENTIFIER = com.eular.WriteTyperUITests; 522 | PRODUCT_NAME = WriteTyper; 523 | TEST_TARGET_NAME = WriteTyper; 524 | USES_XCTRUNNER = YES; 525 | }; 526 | name = Debug; 527 | }; 528 | BB0F4DE51BA447A400B26E8E /* Release */ = { 529 | isa = XCBuildConfiguration; 530 | buildSettings = { 531 | COMBINE_HIDPI_IMAGES = YES; 532 | INFOPLIST_FILE = WriteTyperUITests/Info.plist; 533 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks"; 534 | PRODUCT_BUNDLE_IDENTIFIER = com.eular.WriteTyperUITests; 535 | PRODUCT_NAME = WriteTyper; 536 | TEST_TARGET_NAME = WriteTyper; 537 | USES_XCTRUNNER = YES; 538 | }; 539 | name = Release; 540 | }; 541 | /* End XCBuildConfiguration section */ 542 | 543 | /* Begin XCConfigurationList section */ 544 | BB0F4DB31BA447A400B26E8E /* Build configuration list for PBXProject "WriteTyper" */ = { 545 | isa = XCConfigurationList; 546 | buildConfigurations = ( 547 | BB0F4DDB1BA447A400B26E8E /* Debug */, 548 | BB0F4DDC1BA447A400B26E8E /* Release */, 549 | ); 550 | defaultConfigurationIsVisible = 0; 551 | defaultConfigurationName = Release; 552 | }; 553 | BB0F4DDD1BA447A400B26E8E /* Build configuration list for PBXNativeTarget "WriteTyper" */ = { 554 | isa = XCConfigurationList; 555 | buildConfigurations = ( 556 | BB0F4DDE1BA447A400B26E8E /* Debug */, 557 | BB0F4DDF1BA447A400B26E8E /* Release */, 558 | ); 559 | defaultConfigurationIsVisible = 0; 560 | defaultConfigurationName = Release; 561 | }; 562 | BB0F4DE01BA447A400B26E8E /* Build configuration list for PBXNativeTarget "WriteTyperTests" */ = { 563 | isa = XCConfigurationList; 564 | buildConfigurations = ( 565 | BB0F4DE11BA447A400B26E8E /* Debug */, 566 | BB0F4DE21BA447A400B26E8E /* Release */, 567 | ); 568 | defaultConfigurationIsVisible = 0; 569 | defaultConfigurationName = Release; 570 | }; 571 | BB0F4DE31BA447A400B26E8E /* Build configuration list for PBXNativeTarget "WriteTyperUITests" */ = { 572 | isa = XCConfigurationList; 573 | buildConfigurations = ( 574 | BB0F4DE41BA447A400B26E8E /* Debug */, 575 | BB0F4DE51BA447A400B26E8E /* Release */, 576 | ); 577 | defaultConfigurationIsVisible = 0; 578 | defaultConfigurationName = Release; 579 | }; 580 | /* End XCConfigurationList section */ 581 | }; 582 | rootObject = BB0F4DB01BA447A400B26E8E /* Project object */; 583 | } 584 | -------------------------------------------------------------------------------- /WriteTyper/WriteTyper.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /WriteTyper/WriteTyper/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // WriteTyper 4 | // 5 | // Created by Eular on 9/12/15. 6 | // Copyright © 2015 Eular. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | import AVFoundation 11 | 12 | func toggleDockIcon(showIcon state: Bool) -> Bool { 13 | var result: Bool 14 | if state { 15 | result = NSApp.setActivationPolicy(NSApplicationActivationPolicy.Regular) 16 | } 17 | else { 18 | result = NSApp.setActivationPolicy(NSApplicationActivationPolicy.Accessory) 19 | } 20 | return result 21 | } 22 | 23 | 24 | @NSApplicationMain 25 | class AppDelegate: NSObject, NSApplicationDelegate { 26 | 27 | let statusItem = NSStatusBar.systemStatusBar().statusItemWithLength(30) 28 | let popover = NSPopover() 29 | var avPlayer: AVAudioPlayer! 30 | 31 | // システム環境設定に設定変更を依頼する 32 | func acquirePrivileges() -> Bool { 33 | let accessEnabled = AXIsProcessTrustedWithOptions( 34 | [kAXTrustedCheckOptionPrompt.takeUnretainedValue() as String: true]) 35 | if !accessEnabled { 36 | print("You need to enable the WriteTyper in the System Prefrences") 37 | } 38 | return accessEnabled 39 | } 40 | 41 | func applicationDidFinishLaunching(aNotification: NSNotification) { 42 | // Insert code here to initialize your application 43 | let isAcquirePrivileges = acquirePrivileges() 44 | 45 | if isAcquirePrivileges { 46 | NSEvent.addGlobalMonitorForEventsMatchingMask( 47 | NSEventMask.KeyDownMask, handler: {(theEvent: NSEvent) in 48 | let key = theEvent.keyCode 49 | self.playSoundsByKey(key) 50 | }) 51 | } else { 52 | let alert = NSAlert() 53 | alert.window.title = "WriteTyper" 54 | alert.messageText = "Help" 55 | alert.informativeText = "For it to work: Accessibility for WriteTyper must be enabled in Security & Privacy, System Preferences.\n\nMade by Urinx, based on original NoisyTyper" 56 | alert.runModal() 57 | } 58 | 59 | // Add menu bar icon 60 | if let button = statusItem.button { 61 | button.image = NSImage(named: "typewriter") 62 | button.action = Selector("togglePopover:") 63 | } 64 | 65 | popover.contentViewController = SettingViewController(nibName: "SettingViewController", bundle: nil) 66 | 67 | // Dock Icon 68 | let defaults = NSUserDefaults.standardUserDefaults() 69 | toggleDockIcon(showIcon: defaults.boolForKey("showIcon")) 70 | } 71 | 72 | func showPopover(sender: AnyObject?) { 73 | if let button = statusItem.button { 74 | popover.showRelativeToRect(button.bounds, ofView: button, preferredEdge: .MinY) 75 | } 76 | } 77 | 78 | func closePopover(sender: AnyObject?) { 79 | popover.performClose(sender) 80 | } 81 | 82 | func togglePopover(sender: AnyObject?) { 83 | if popover.shown { 84 | closePopover(sender) 85 | } else { 86 | showPopover(sender) 87 | } 88 | } 89 | 90 | func playSoundsByKey(key: UInt16) { 91 | var rate:Float = 1.0 92 | var pan:Float = 0.0 93 | var volume:Float = 0.5 94 | var sound = "key-new-01" 95 | 96 | switch key { 97 | case 125: // scrollDown 98 | rate = ofRandom(0.85, max: 1.0) 99 | pan = -0.7 100 | volume = 1.0 101 | sound = "scrollDown" 102 | case 126: // scrollUp 103 | rate = ofRandom(0.85, max: 1.0) 104 | pan = -0.7 105 | volume = 1.0 106 | sound = "scrollUp" 107 | case 51: // backspace 108 | rate = ofRandom(0.97, max: 1.03) 109 | volume = 1.0 110 | pan = 0.75 111 | sound = "backspace" 112 | case 49: // space 113 | rate = ofRandom(0.95, max: 1.05) 114 | volume = ofRandom(0.8, max: 1.1) 115 | sound = "space-new" 116 | case 36: // return 117 | rate = ofRandom(0.99, max: 1.01) 118 | volume = ofRandom(0.7, max: 1.1) 119 | pan = 0.3 120 | sound = "return-new" 121 | default: 122 | rate = ofRandom(0.98, max: 1.02) 123 | volume = ofRandom(0.7, max: 1.1) 124 | sound = "key-new-0\(random() % 5 + 1)" 125 | 126 | if( key == 12 || key == 13 || key == 0 || key == 1 || key == 6 || key == 7 ) { 127 | pan = -0.65 128 | } else if( key == 35 || key == 37 || key == 43 || key == 31 || key == 40 || key == 46 ) { 129 | pan = 0.65 130 | } else { 131 | pan = ofRandom(-0.3, max: 0.3) 132 | } 133 | } 134 | 135 | do { 136 | avPlayer = try AVAudioPlayer(contentsOfURL: NSURL(fileURLWithPath: NSBundle.mainBundle().pathForResource(sound, ofType: "mp3")!)) 137 | avPlayer.rate = rate 138 | avPlayer.pan = pan 139 | avPlayer.volume = volume 140 | avPlayer.play() 141 | } catch {} 142 | } 143 | 144 | func ofRandom(min: Float, max: Float) -> Float { 145 | return Float(arc4random()) / 0xFFFFFFFF * (max - min) + min 146 | } 147 | 148 | func applicationWillTerminate(aNotification: NSNotification) { 149 | // Insert code here to tear down your application 150 | } 151 | 152 | } 153 | 154 | -------------------------------------------------------------------------------- /WriteTyper/WriteTyper/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "16x16", 5 | "idiom" : "mac", 6 | "filename" : "icon_16x16.png", 7 | "scale" : "1x" 8 | }, 9 | { 10 | "size" : "16x16", 11 | "idiom" : "mac", 12 | "filename" : "icon_16x16@2x.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "32x32", 17 | "idiom" : "mac", 18 | "filename" : "icon_32x32.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "32x32", 23 | "idiom" : "mac", 24 | "filename" : "icon_32x32@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "128x128", 29 | "idiom" : "mac", 30 | "filename" : "icon_128x128.png", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "size" : "128x128", 35 | "idiom" : "mac", 36 | "filename" : "icon_128x128@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "256x256", 41 | "idiom" : "mac", 42 | "filename" : "icon_256x256.png", 43 | "scale" : "1x" 44 | }, 45 | { 46 | "size" : "256x256", 47 | "idiom" : "mac", 48 | "filename" : "icon_256x256@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "512x512", 53 | "idiom" : "mac", 54 | "filename" : "icon_512x512.png", 55 | "scale" : "1x" 56 | }, 57 | { 58 | "size" : "512x512", 59 | "idiom" : "mac", 60 | "filename" : "icon_512x512@2x.png", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /WriteTyper/WriteTyper/Assets.xcassets/AppIcon.appiconset/icon_128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urinx/WriteTyper/c4d52f81136b22a3502ae6a5d0bdc159db6c41e4/WriteTyper/WriteTyper/Assets.xcassets/AppIcon.appiconset/icon_128x128.png -------------------------------------------------------------------------------- /WriteTyper/WriteTyper/Assets.xcassets/AppIcon.appiconset/icon_128x128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urinx/WriteTyper/c4d52f81136b22a3502ae6a5d0bdc159db6c41e4/WriteTyper/WriteTyper/Assets.xcassets/AppIcon.appiconset/icon_128x128@2x.png -------------------------------------------------------------------------------- /WriteTyper/WriteTyper/Assets.xcassets/AppIcon.appiconset/icon_16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urinx/WriteTyper/c4d52f81136b22a3502ae6a5d0bdc159db6c41e4/WriteTyper/WriteTyper/Assets.xcassets/AppIcon.appiconset/icon_16x16.png -------------------------------------------------------------------------------- /WriteTyper/WriteTyper/Assets.xcassets/AppIcon.appiconset/icon_16x16@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urinx/WriteTyper/c4d52f81136b22a3502ae6a5d0bdc159db6c41e4/WriteTyper/WriteTyper/Assets.xcassets/AppIcon.appiconset/icon_16x16@2x.png -------------------------------------------------------------------------------- /WriteTyper/WriteTyper/Assets.xcassets/AppIcon.appiconset/icon_256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urinx/WriteTyper/c4d52f81136b22a3502ae6a5d0bdc159db6c41e4/WriteTyper/WriteTyper/Assets.xcassets/AppIcon.appiconset/icon_256x256.png -------------------------------------------------------------------------------- /WriteTyper/WriteTyper/Assets.xcassets/AppIcon.appiconset/icon_256x256@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urinx/WriteTyper/c4d52f81136b22a3502ae6a5d0bdc159db6c41e4/WriteTyper/WriteTyper/Assets.xcassets/AppIcon.appiconset/icon_256x256@2x.png -------------------------------------------------------------------------------- /WriteTyper/WriteTyper/Assets.xcassets/AppIcon.appiconset/icon_32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urinx/WriteTyper/c4d52f81136b22a3502ae6a5d0bdc159db6c41e4/WriteTyper/WriteTyper/Assets.xcassets/AppIcon.appiconset/icon_32x32.png -------------------------------------------------------------------------------- /WriteTyper/WriteTyper/Assets.xcassets/AppIcon.appiconset/icon_32x32@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urinx/WriteTyper/c4d52f81136b22a3502ae6a5d0bdc159db6c41e4/WriteTyper/WriteTyper/Assets.xcassets/AppIcon.appiconset/icon_32x32@2x.png -------------------------------------------------------------------------------- /WriteTyper/WriteTyper/Assets.xcassets/AppIcon.appiconset/icon_512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urinx/WriteTyper/c4d52f81136b22a3502ae6a5d0bdc159db6c41e4/WriteTyper/WriteTyper/Assets.xcassets/AppIcon.appiconset/icon_512x512.png -------------------------------------------------------------------------------- /WriteTyper/WriteTyper/Assets.xcassets/AppIcon.appiconset/icon_512x512@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urinx/WriteTyper/c4d52f81136b22a3502ae6a5d0bdc159db6c41e4/WriteTyper/WriteTyper/Assets.xcassets/AppIcon.appiconset/icon_512x512@2x.png -------------------------------------------------------------------------------- /WriteTyper/WriteTyper/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /WriteTyper/WriteTyper/Assets.xcassets/qrcode.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "qrcode.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /WriteTyper/WriteTyper/Assets.xcassets/qrcode.imageset/qrcode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urinx/WriteTyper/c4d52f81136b22a3502ae6a5d0bdc159db6c41e4/WriteTyper/WriteTyper/Assets.xcassets/qrcode.imageset/qrcode.png -------------------------------------------------------------------------------- /WriteTyper/WriteTyper/Assets.xcassets/shutdown.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "shutdown.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /WriteTyper/WriteTyper/Assets.xcassets/shutdown.imageset/shutdown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urinx/WriteTyper/c4d52f81136b22a3502ae6a5d0bdc159db6c41e4/WriteTyper/WriteTyper/Assets.xcassets/shutdown.imageset/shutdown.png -------------------------------------------------------------------------------- /WriteTyper/WriteTyper/Assets.xcassets/typewriter.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "mac" 5 | }, 6 | { 7 | "idiom" : "mac", 8 | "scale" : "1x" 9 | }, 10 | { 11 | "idiom" : "mac", 12 | "filename" : "typewriter@2x.png", 13 | "scale" : "2x" 14 | } 15 | ], 16 | "info" : { 17 | "version" : 1, 18 | "author" : "xcode" 19 | }, 20 | "properties" : { 21 | "template-rendering-intent" : "template" 22 | } 23 | } -------------------------------------------------------------------------------- /WriteTyper/WriteTyper/Assets.xcassets/typewriter.imageset/typewriter@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urinx/WriteTyper/c4d52f81136b22a3502ae6a5d0bdc159db6c41e4/WriteTyper/WriteTyper/Assets.xcassets/typewriter.imageset/typewriter@2x.png -------------------------------------------------------------------------------- /WriteTyper/WriteTyper/Assets.xcassets/wechat.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "wechat.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /WriteTyper/WriteTyper/Assets.xcassets/wechat.imageset/wechat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urinx/WriteTyper/c4d52f81136b22a3502ae6a5d0bdc159db6c41e4/WriteTyper/WriteTyper/Assets.xcassets/wechat.imageset/wechat.png -------------------------------------------------------------------------------- /WriteTyper/WriteTyper/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /WriteTyper/WriteTyper/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 2.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSMinimumSystemVersion 26 | $(MACOSX_DEPLOYMENT_TARGET) 27 | LSUIElement 28 | 29 | NSHumanReadableCopyright 30 | Copyright © 2015 Eular. All rights reserved. 31 | NSMainStoryboardFile 32 | Main 33 | NSPrincipalClass 34 | NSApplication 35 | 36 | 37 | -------------------------------------------------------------------------------- /WriteTyper/WriteTyper/SettingViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SettingViewController.swift 3 | // WriteTyper 4 | // 5 | // Created by Eular on 9/13/15. 6 | // Copyright © 2015 Eular. All rights reserved. 7 | // 8 | 9 | import Cocoa 10 | 11 | class SettingViewController: NSViewController { 12 | 13 | @IBOutlet weak var dockBtn: NSButton! 14 | @IBOutlet weak var startupBtn: NSButton! 15 | var showShare = true 16 | 17 | override func viewDidLoad() { 18 | super.viewDidLoad() 19 | // Do view setup here. 20 | let defaults = NSUserDefaults.standardUserDefaults() 21 | if defaults.boolForKey("showIcon") { 22 | dockBtn.state = NSOnState 23 | } else { 24 | dockBtn.state = NSOffState 25 | } 26 | 27 | if defaults.boolForKey("launchStartup") { 28 | startupBtn.state = NSOnState 29 | } else { 30 | startupBtn.state = NSOffState 31 | } 32 | self.view.frame.size.height = 352 33 | 34 | if applicationIsInStartUpItems() { 35 | startupBtn.state = NSOnState 36 | } else { 37 | startupBtn.state = NSOffState 38 | } 39 | } 40 | 41 | /* 42 | applicationIsInStartUpItems() 43 | itemReferencesInLoginItems() 44 | toggleLaunchAtStartup() 45 | refs: http://stackoverflow.com/questions/26475008/swift-getting-a-mac-app-to-launch-on-startup 46 | */ 47 | func applicationIsInStartUpItems() -> Bool { 48 | return (itemReferencesInLoginItems().existingReference != nil) 49 | } 50 | 51 | func itemReferencesInLoginItems() -> (existingReference: LSSharedFileListItemRef?, lastReference: LSSharedFileListItemRef?) { 52 | if let appUrl : NSURL = NSURL.fileURLWithPath(NSBundle.mainBundle().bundlePath) { 53 | let loginItemsRef = LSSharedFileListCreate( 54 | nil, 55 | kLSSharedFileListSessionLoginItems.takeRetainedValue(), 56 | nil 57 | ).takeRetainedValue() as LSSharedFileListRef? 58 | if loginItemsRef != nil { 59 | let loginItems: NSArray = LSSharedFileListCopySnapshot(loginItemsRef, nil).takeRetainedValue() as NSArray 60 | //print("There are \(loginItems.count) login items") 61 | let lastItemRef: LSSharedFileListItemRef = loginItems.lastObject as! LSSharedFileListItemRef 62 | for var i = 0; i < loginItems.count; ++i { 63 | let currentItemRef: LSSharedFileListItemRef = loginItems.objectAtIndex(i) as! LSSharedFileListItemRef 64 | 65 | if let resUrl = LSSharedFileListItemCopyResolvedURL(currentItemRef, 0, nil){ 66 | let urlRef: NSURL = resUrl.takeRetainedValue() 67 | //print("URL Ref: \(urlRef.lastPathComponent!)") 68 | if urlRef.isEqual(appUrl) { 69 | return (currentItemRef, lastItemRef) 70 | } 71 | } else { 72 | //print("Unknown login application") 73 | } 74 | } 75 | //The application was not found in the startup list 76 | return (nil, lastItemRef) 77 | } 78 | } 79 | return (nil, nil) 80 | } 81 | 82 | func toggleLaunchAtStartup() { 83 | let itemReferences = itemReferencesInLoginItems() 84 | let shouldBeToggled = (itemReferences.existingReference == nil) 85 | let loginItemsRef = LSSharedFileListCreate( 86 | nil, 87 | kLSSharedFileListSessionLoginItems.takeRetainedValue(), 88 | nil 89 | ).takeRetainedValue() as LSSharedFileListRef? 90 | if loginItemsRef != nil { 91 | if shouldBeToggled { 92 | if let appUrl : CFURLRef = NSURL.fileURLWithPath(NSBundle.mainBundle().bundlePath) { 93 | LSSharedFileListInsertItemURL( 94 | loginItemsRef, 95 | itemReferences.lastReference, 96 | nil, 97 | nil, 98 | appUrl, 99 | nil, 100 | nil 101 | ) 102 | print("Application was added to login items") 103 | } 104 | } else { 105 | if let itemRef = itemReferences.existingReference { 106 | LSSharedFileListItemRemove(loginItemsRef,itemRef); 107 | print("Application was removed from login items") 108 | } 109 | } 110 | } 111 | } 112 | 113 | @IBAction func goGithub(sender: AnyObject) { 114 | NSWorkspace.sharedWorkspace().openURL(NSURL(string: "http://github.com/urinx")!) 115 | } 116 | 117 | @IBAction func setDockIcon(sender: AnyObject) { 118 | let btn = sender as! NSButton 119 | let defaults = NSUserDefaults.standardUserDefaults() 120 | switch btn.state { 121 | case NSOnState: 122 | toggleDockIcon(showIcon: true) 123 | defaults.setBool(true, forKey: "showIcon") 124 | case NSOffState: 125 | toggleDockIcon(showIcon: false) 126 | defaults.setBool(false, forKey: "showIcon") 127 | default: 128 | break 129 | } 130 | } 131 | 132 | @IBAction func setLaunch(sender: AnyObject) { 133 | toggleLaunchAtStartup() 134 | } 135 | 136 | @IBAction func share(sender: AnyObject) { 137 | if showShare { 138 | self.view.frame.size.height = 585 139 | } else { 140 | self.view.frame.size.height = 352 141 | } 142 | showShare = !showShare 143 | } 144 | 145 | @IBAction func quit(sender: AnyObject) { 146 | NSApplication.sharedApplication().terminate(self) 147 | } 148 | 149 | } 150 | -------------------------------------------------------------------------------- /WriteTyper/WriteTyper/SettingViewController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 64 | 74 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 106 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | -------------------------------------------------------------------------------- /WriteTyper/WriteTyper/sounds/backspace.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urinx/WriteTyper/c4d52f81136b22a3502ae6a5d0bdc159db6c41e4/WriteTyper/WriteTyper/sounds/backspace.mp3 -------------------------------------------------------------------------------- /WriteTyper/WriteTyper/sounds/key-01.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urinx/WriteTyper/c4d52f81136b22a3502ae6a5d0bdc159db6c41e4/WriteTyper/WriteTyper/sounds/key-01.mp3 -------------------------------------------------------------------------------- /WriteTyper/WriteTyper/sounds/key-02.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urinx/WriteTyper/c4d52f81136b22a3502ae6a5d0bdc159db6c41e4/WriteTyper/WriteTyper/sounds/key-02.mp3 -------------------------------------------------------------------------------- /WriteTyper/WriteTyper/sounds/key-03.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urinx/WriteTyper/c4d52f81136b22a3502ae6a5d0bdc159db6c41e4/WriteTyper/WriteTyper/sounds/key-03.mp3 -------------------------------------------------------------------------------- /WriteTyper/WriteTyper/sounds/key-04.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urinx/WriteTyper/c4d52f81136b22a3502ae6a5d0bdc159db6c41e4/WriteTyper/WriteTyper/sounds/key-04.mp3 -------------------------------------------------------------------------------- /WriteTyper/WriteTyper/sounds/key-new-01.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urinx/WriteTyper/c4d52f81136b22a3502ae6a5d0bdc159db6c41e4/WriteTyper/WriteTyper/sounds/key-new-01.mp3 -------------------------------------------------------------------------------- /WriteTyper/WriteTyper/sounds/key-new-02.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urinx/WriteTyper/c4d52f81136b22a3502ae6a5d0bdc159db6c41e4/WriteTyper/WriteTyper/sounds/key-new-02.mp3 -------------------------------------------------------------------------------- /WriteTyper/WriteTyper/sounds/key-new-03.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urinx/WriteTyper/c4d52f81136b22a3502ae6a5d0bdc159db6c41e4/WriteTyper/WriteTyper/sounds/key-new-03.mp3 -------------------------------------------------------------------------------- /WriteTyper/WriteTyper/sounds/key-new-04.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urinx/WriteTyper/c4d52f81136b22a3502ae6a5d0bdc159db6c41e4/WriteTyper/WriteTyper/sounds/key-new-04.mp3 -------------------------------------------------------------------------------- /WriteTyper/WriteTyper/sounds/key-new-05.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urinx/WriteTyper/c4d52f81136b22a3502ae6a5d0bdc159db6c41e4/WriteTyper/WriteTyper/sounds/key-new-05.mp3 -------------------------------------------------------------------------------- /WriteTyper/WriteTyper/sounds/return-new.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urinx/WriteTyper/c4d52f81136b22a3502ae6a5d0bdc159db6c41e4/WriteTyper/WriteTyper/sounds/return-new.mp3 -------------------------------------------------------------------------------- /WriteTyper/WriteTyper/sounds/return.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urinx/WriteTyper/c4d52f81136b22a3502ae6a5d0bdc159db6c41e4/WriteTyper/WriteTyper/sounds/return.mp3 -------------------------------------------------------------------------------- /WriteTyper/WriteTyper/sounds/scrollDown.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urinx/WriteTyper/c4d52f81136b22a3502ae6a5d0bdc159db6c41e4/WriteTyper/WriteTyper/sounds/scrollDown.mp3 -------------------------------------------------------------------------------- /WriteTyper/WriteTyper/sounds/scrollUp.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urinx/WriteTyper/c4d52f81136b22a3502ae6a5d0bdc159db6c41e4/WriteTyper/WriteTyper/sounds/scrollUp.mp3 -------------------------------------------------------------------------------- /WriteTyper/WriteTyper/sounds/space-new.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urinx/WriteTyper/c4d52f81136b22a3502ae6a5d0bdc159db6c41e4/WriteTyper/WriteTyper/sounds/space-new.mp3 -------------------------------------------------------------------------------- /WriteTyper/WriteTyper/sounds/space.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urinx/WriteTyper/c4d52f81136b22a3502ae6a5d0bdc159db6c41e4/WriteTyper/WriteTyper/sounds/space.mp3 -------------------------------------------------------------------------------- /WriteTyper/WriteTyperTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /WriteTyper/WriteTyperTests/NoisyTyperTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NoisyTyperTests.swift 3 | // NoisyTyperTests 4 | // 5 | // Created by Eular on 9/12/15. 6 | // Copyright © 2015 Eular. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import NoisyTyper 11 | 12 | class NoisyTyperTests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | // Use XCTAssert and related functions to verify your tests produce the correct results. 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measureBlock { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /WriteTyper/WriteTyperUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /WriteTyper/WriteTyperUITests/NoisyTyperUITests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NoisyTyperUITests.swift 3 | // NoisyTyperUITests 4 | // 5 | // Created by Eular on 9/12/15. 6 | // Copyright © 2015 Eular. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class NoisyTyperUITests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | 18 | // In UI tests it is usually best to stop immediately when a failure occurs. 19 | continueAfterFailure = false 20 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 21 | XCUIApplication().launch() 22 | 23 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 24 | } 25 | 26 | override func tearDown() { 27 | // Put teardown code here. This method is called after the invocation of each test method in the class. 28 | super.tearDown() 29 | } 30 | 31 | func testExample() { 32 | // Use recording to get started writing UI tests. 33 | // Use XCTAssert and related functions to verify your tests produce the correct results. 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /screenshot/app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urinx/WriteTyper/c4d52f81136b22a3502ae6a5d0bdc159db6c41e4/screenshot/app.png -------------------------------------------------------------------------------- /screenshot/home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Urinx/WriteTyper/c4d52f81136b22a3502ae6a5d0bdc159db6c41e4/screenshot/home.png --------------------------------------------------------------------------------