Skip to content

Commit

Permalink
chore(web): resolves old TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
jahorton committed Nov 14, 2023
1 parent c84c2e2 commit 2eb69f9
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions web/src/engine/osk/src/input/gestures/specsForLayout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -504,19 +504,8 @@ export function specialKeyStartModel(): GestureModel<KeyElement> {
{
model: {
...instantContactResolutionModel(),
allowsInitialState: (incoming, dummy, baseItem) => {
// TODO: needs better abstraction, probably.

// But, to get started... we can just use a simple hardcoded approach.
const modifierKeyIds = ['K_LOPT', 'K_ROPT', 'K_BKSP'];
for(const modKeyId of modifierKeyIds) {
if(baseItem?.key.spec.id == modKeyId) {
return true;
}
}

return false;
}
// Filtering is done via `gestureKeyFilter` as defined within `gestureSetForLayout` above.
// If we've gotten to this point, we're already safe to assume the base key is valid.
},
endOnResolve: false // keyboard-selection longpress - would be nice to not need to lift the finger
// in app/browser form.
Expand Down

0 comments on commit 2eb69f9

Please sign in to comment.