Skip to content

Commit

Permalink
feat: capital letters
Browse files Browse the repository at this point in the history
  • Loading branch information
marnixah committed Jan 21, 2022
1 parent 5733fc5 commit e0e07d2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/classes/KeyboardManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export default class KeyboardManager {

async sendKey(key: string): Promise<void> {
const [row, col] = this.keyToRowCol(key);
if (key.toUpperCase() === key) await this.shift(); // if the letter is capital, shift
await this.setCol(col); // horizontal first
await this.setRow(row); // then vertical
await this.tv.ok();
Expand Down Expand Up @@ -74,4 +75,10 @@ export default class KeyboardManager {
}
this.col = col;
}

async shift(): Promise<void> {
await this.setRow(3);
await this.setCol(0);
await this.tv.ok();
}
}

0 comments on commit e0e07d2

Please sign in to comment.