Remove unused code in Keyboard.swift. Make the String extension private, since it’s used only in that file.

This commit is contained in:
Brent Simmons 2024-05-26 11:56:37 -07:00
parent e275367664
commit 666f1d9f4a
1 changed files with 3 additions and 10 deletions

View File

@ -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 {