Skip to content

Commit

Permalink
fix broken virtual keyboard keys
Browse files Browse the repository at this point in the history
  • Loading branch information
dqnykamp committed Jul 1, 2024
1 parent 6251db2 commit fe0b4b4
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions packages/virtual-keyboard/src/virtual-keyboard/keys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const TEX_NAMES_LOWER = [
"upsilon",
"theta",
"iota",
"omicron",
null,
"pi",
"alpha",
"sigma",
Expand Down Expand Up @@ -92,7 +92,12 @@ export const KEYS = {
greek_lower: [..."ϕ𝜍ερτυθιοπασδφγηξκλζχψωβνμ,'"].map((c, i) => ({
displayName: c,
name: c,
commands: [{ type: "write", command: `\\${TEX_NAMES_LOWER[i]}` }],
commands: [
{
type: "write",
command: TEX_NAMES_LOWER[i] ? `\\${TEX_NAMES_LOWER[i]}` : c,
},
],
})),
// upper-case greek letters in QWERTY order
greek_upper: [..."ΦΣΕΡΤΥΘΙΟΠΑΣΔΦΓΗΞΚΛΖΧΨΩΒΝΜ,'"].map((c, i) => ({
Expand Down Expand Up @@ -147,7 +152,7 @@ export const OPERATOR_KEYS = {
times: {
displayName: "×",
name: "times",
commands: [{ type: "type", command: "\\times" }],
commands: [{ type: "write", command: "\\times" }],
},
divide: {
displayName: "÷",
Expand Down Expand Up @@ -353,12 +358,12 @@ export const OTHER_SYMBOLS = {
langle: {
displayName: "⟨",
name: "langle",
commands: [{ type: "write", command: "\\langle" }],
commands: [{ type: "cmd", command: "\\langle" }],
},
rangle: {
displayName: "⟩",
name: "rangle",
commands: [{ type: "write", command: "\\rangle" }],
commands: [{ type: "cmd", command: "\\rangle" }],
},
cdot: {
displayName: "⋅",
Expand All @@ -373,7 +378,7 @@ export const OTHER_SYMBOLS = {
conj: {
displayName: "a\u0304",
name: "conj",
commands: [{ type: "write", command: "overline{a}" }],
commands: [{ type: "cmd", command: "\\overline" }],
},
perp: {
displayName: "⊥",
Expand Down Expand Up @@ -539,12 +544,12 @@ export const FUNCTION_KEYS = {
nPr: {
displayName: "nPr",
name: "nPr",
commands: [{ type: "write", command: "nPr(" }],
commands: [{ type: "type", command: "nPr(" }],
},
nCr: {
displayName: "nCr",
name: "nCr",
commands: [{ type: "write", command: "nCr(" }],
commands: [{ type: "type", command: "nCr(" }],
},
factorial: {
displayName: "n!",
Expand Down

0 comments on commit fe0b4b4

Please sign in to comment.