From 666f1d9f4a01a452bd888b10bec85c6a12ac00d3 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Sun, 26 May 2024 11:56:37 -0700 Subject: [PATCH] =?UTF-8?q?Remove=20unused=20code=20in=20Keyboard.swift.?= =?UTF-8?q?=20Make=20the=20String=20extension=20private,=20since=20it?= =?UTF-8?q?=E2=80=99s=20used=20only=20in=20that=20file.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AppKitExtras/Sources/AppKitExtras/Keyboard.swift | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/AppKitExtras/Sources/AppKitExtras/Keyboard.swift b/AppKitExtras/Sources/AppKitExtras/Keyboard.swift index 535f5a630..017720373 100644 --- a/AppKitExtras/Sources/AppKitExtras/Keyboard.swift +++ b/AppKitExtras/Sources/AppKitExtras/Keyboard.swift @@ -5,19 +5,12 @@ // Created by Brent Simmons on 12/19/17. // Copyright © 2017 Ranchero Software, LLC. All rights reserved. // + #if os(macOS) + import AppKit -// To get, for instance, the keyboard integer value for "\r": "\r".keyboardIntegerValue (returns 13) - -public struct KeyboardConstant { - - public static let lineFeedKey = "\n".keyboardIntegerValue - public static let returnKey = "\r".keyboardIntegerValue - public static let spaceKey = " ".keyboardIntegerValue -} - -extension String { +private extension String { var keyboardIntegerValue: Int? { if isEmpty {