Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add simple key tester #304

Merged
merged 6 commits into from
Oct 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions macos/QMK Toolbox.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,13 @@
09D79CBA1FB8A6360086ABF6 /* libusb-1.0.0.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = 09D79CB51FB0DD7F0086ABF6 /* libusb-1.0.0.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
09D79CBC1FB8A64B0086ABF6 /* libusb-0.1.4.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = 09D79CBB1FB8A6490086ABF6 /* libusb-0.1.4.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
303568C11FA7DEF400803BEF /* Constants.m in Sources */ = {isa = PBXBuildFile; fileRef = 303568C01FA7DEF400803BEF /* Constants.m */; };
3A1AF21126FA31D700AC977B /* KeyTesterWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 3A1AF21026FA31D700AC977B /* KeyTesterWindow.m */; };
3A5166BC26E07F0000EBE3DC /* KeyView.m in Sources */ = {isa = PBXBuildFile; fileRef = 3A5166BB26E07F0000EBE3DC /* KeyView.m */; };
3A62C86526A96AED001C655A /* reset_right.eep in Resources */ = {isa = PBXBuildFile; fileRef = 3A62C86326A96AED001C655A /* reset_right.eep */; };
3A62C86626A96AED001C655A /* reset_left.eep in Resources */ = {isa = PBXBuildFile; fileRef = 3A62C86426A96AED001C655A /* reset_left.eep */; };
3A7770DA22BD3BA300398C40 /* libftdi.1.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = 3A7770D822BD3B8200398C40 /* libftdi.1.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
3A8F9EFF26E75012007480A7 /* KeyTesterWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3A8F9F0126E75012007480A7 /* KeyTesterWindow.xib */; };
3A8F9F0226E7501E007480A7 /* KeyView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3A8F9F0426E7501E007480A7 /* KeyView.xib */; };
3A93852826AB5A790026F3C4 /* HIDConsoleListener.m in Sources */ = {isa = PBXBuildFile; fileRef = 3A93852726AB5A790026F3C4 /* HIDConsoleListener.m */; };
3A93852B26AB83840026F3C4 /* HIDConsoleDevice.m in Sources */ = {isa = PBXBuildFile; fileRef = 3A93852A26AB83840026F3C4 /* HIDConsoleDevice.m */; };
3AB4BC9D2495540A00204A3F /* bootloadHID in Resources */ = {isa = PBXBuildFile; fileRef = 3AB4BC9C2495540A00204A3F /* bootloadHID */; };
Expand Down Expand Up @@ -78,9 +82,15 @@
09D79CBB1FB8A6490086ABF6 /* libusb-0.1.4.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = "libusb-0.1.4.dylib"; sourceTree = "<group>"; };
303568C01FA7DEF400803BEF /* Constants.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Constants.m; sourceTree = "<group>"; };
303568C21FA7DF0900803BEF /* Constants.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Constants.h; sourceTree = "<group>"; };
3A1AF20F26FA31D700AC977B /* KeyTesterWindow.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KeyTesterWindow.h; sourceTree = "<group>"; };
3A1AF21026FA31D700AC977B /* KeyTesterWindow.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KeyTesterWindow.m; sourceTree = "<group>"; };
3A5166BA26E07F0000EBE3DC /* KeyView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = KeyView.h; sourceTree = "<group>"; };
3A5166BB26E07F0000EBE3DC /* KeyView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KeyView.m; sourceTree = "<group>"; };
3A62C86326A96AED001C655A /* reset_right.eep */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = reset_right.eep; path = ../../../common/reset_right.eep; sourceTree = "<group>"; };
3A62C86426A96AED001C655A /* reset_left.eep */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = reset_left.eep; path = ../../../common/reset_left.eep; sourceTree = "<group>"; };
3A7770D822BD3B8200398C40 /* libftdi.1.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libftdi.1.dylib; sourceTree = "<group>"; };
3A8F9F0026E75012007480A7 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/KeyTesterWindow.xib; sourceTree = "<group>"; };
3A8F9F0326E7501E007480A7 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/KeyView.xib; sourceTree = "<group>"; };
3A93852626AB5A790026F3C4 /* HIDConsoleListener.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HIDConsoleListener.h; sourceTree = "<group>"; };
3A93852726AB5A790026F3C4 /* HIDConsoleListener.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HIDConsoleListener.m; sourceTree = "<group>"; };
3A93852926AB83840026F3C4 /* HIDConsoleDevice.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HIDConsoleDevice.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -126,6 +136,7 @@
092964011F5C8B2C004F2D3F /* Assets.xcassets */,
092964061F5C8B2C004F2D3F /* Info.plist */,
3A3DDC4C26AE27F600A04A99 /* HIDConsole */,
3AC739EB26E23A9800D8B258 /* KeyTester */,
092964031F5C8B2C004F2D3F /* MainMenu.xib */,
092963FB1F5C8B2C004F2D3F /* AppDelegate.h */,
092963FC1F5C8B2C004F2D3F /* AppDelegate.m */,
Expand Down Expand Up @@ -186,6 +197,19 @@
path = Resources;
sourceTree = "<group>";
};
3AC739EB26E23A9800D8B258 /* KeyTester */ = {
isa = PBXGroup;
children = (
3A1AF20F26FA31D700AC977B /* KeyTesterWindow.h */,
3A1AF21026FA31D700AC977B /* KeyTesterWindow.m */,
3A8F9F0126E75012007480A7 /* KeyTesterWindow.xib */,
3A5166BA26E07F0000EBE3DC /* KeyView.h */,
3A5166BB26E07F0000EBE3DC /* KeyView.m */,
3A8F9F0426E7501E007480A7 /* KeyView.xib */,
);
path = KeyTester;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand Down Expand Up @@ -245,6 +269,8 @@
buildActionMask = 2147483647;
files = (
092964021F5C8B2C004F2D3F /* Assets.xcassets in Resources */,
3A8F9EFF26E75012007480A7 /* KeyTesterWindow.xib in Resources */,
3A8F9F0226E7501E007480A7 /* KeyView.xib in Resources */,
092964051F5C8B2C004F2D3F /* MainMenu.xib in Resources */,
C9A09B5922EE6837008C3CF3 /* applet-mdflash.bin in Resources */,
09522BBB1F6216BA00AEBC5E /* avrdude.conf in Resources */,
Expand Down Expand Up @@ -274,6 +300,8 @@
098AEE021F5F296000CA054D /* Flashing.m in Sources */,
3A93852B26AB83840026F3C4 /* HIDConsoleDevice.m in Sources */,
3A93852826AB5A790026F3C4 /* HIDConsoleListener.m in Sources */,
3A1AF21126FA31D700AC977B /* KeyTesterWindow.m in Sources */,
3A5166BC26E07F0000EBE3DC /* KeyView.m in Sources */,
098AEDFE1F5F220500CA054D /* Printing.m in Sources */,
098AEE101F60C6F600CA054D /* QMKWindow.m in Sources */,
098AEE0B1F5F97A000CA054D /* USB.m in Sources */,
Expand All @@ -291,6 +319,22 @@
name = MainMenu.xib;
sourceTree = "<group>";
};
3A8F9F0126E75012007480A7 /* KeyTesterWindow.xib */ = {
isa = PBXVariantGroup;
children = (
3A8F9F0026E75012007480A7 /* Base */,
);
name = KeyTesterWindow.xib;
sourceTree = "<group>";
};
3A8F9F0426E7501E007480A7 /* KeyView.xib */ = {
isa = PBXVariantGroup;
children = (
3A8F9F0326E7501E007480A7 /* Base */,
);
name = KeyView.xib;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */

/* Begin XCBuildConfiguration section */
Expand Down
9 changes: 9 additions & 0 deletions macos/QMK Toolbox/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ @interface AppDelegate () <NSTextViewDelegate, NSComboBoxDelegate, HIDConsoleLis
@property IBOutlet NSButton * loadButton;
@property IBOutlet NSComboBox * consoleListBox;

@property NSWindowController * keyTesterWindowController;

@property Flashing * flasher;

@property HIDConsoleListener * consoleListener;
Expand Down Expand Up @@ -408,6 +410,13 @@ - (IBAction)clearButtonClick:(id)sender {
[[self textView] setString: @""];
}

- (IBAction)keyTesterButtonClick:(id)sender {
if (!self.keyTesterWindowController) {
self.keyTesterWindowController = [[NSWindowController alloc] initWithWindowNibName:@"KeyTesterWindow"];
}
[self.keyTesterWindowController showWindow:self];
}

- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)theApplication {
return YES;
}
Expand Down
7 changes: 7 additions & 0 deletions macos/QMK Toolbox/Base.lproj/MainMenu.xib
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,13 @@
<binding destination="Voe-Tx-rLC" name="value" keyPath="autoFlashEnabled" id="mem-Y3-YTB"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="RYV-55-W3w"/>
<menuItem title="Key Tester" id="xri-um-2mM">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="keyTesterButtonClick:" target="Voe-Tx-rLC" id="7ly-FW-DLq"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
Expand Down
Loading