Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
50be722
commit 7e77c2d
Showing
5 changed files
with
47 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
Sources/KeyboardKit/Input/StaticKeyboardInputSetProvider.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// | ||
// StandardKeyboardInputSetProvider.swift | ||
// KeyboardKit | ||
// | ||
// Created by Daniel Saidi on 2020-12-01. | ||
// Copyright © 2020 Daniel Saidi. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
/** | ||
This standard keyboard inputset provider is used by default | ||
by KeyboardKit, and provides the standard input set for the | ||
current locale, if any. You can inherit and customize it to | ||
create your own provider that builds on this foundation. | ||
The dictionaries contain the currently supported input sets. | ||
They are not part of the protocol, but you can use them and | ||
extend them in your own subclasses. | ||
*/ | ||
public class StaticKeyboardInputSetProvider: KeyboardInputSetProvider { | ||
|
||
public init( | ||
alphabeticInputSet: AlphabeticKeyboardInputSet, | ||
numericInputSet: NumericKeyboardInputSet, | ||
symbolicInputSet: SymbolicKeyboardInputSet) { | ||
self.alphabeticInputSet = alphabeticInputSet | ||
self.numericInputSet = numericInputSet | ||
self.symbolicInputSet = symbolicInputSet | ||
} | ||
|
||
public let alphabeticInputSet: AlphabeticKeyboardInputSet | ||
public let numericInputSet: NumericKeyboardInputSet | ||
public let symbolicInputSet: SymbolicKeyboardInputSet | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters