mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-03 20:40:48 +08:00
Added default and forced qwerty layouts
This commit is contained in:
parent
d138775563
commit
6b802facac
3 changed files with 5 additions and 4 deletions
|
@ -1,4 +1,5 @@
|
|||
const layouts = {
|
||||
default: [],
|
||||
qwerty: [
|
||||
"`~","1!","2@","3#","4$","5%","6^","7&","8*","9(","0)","-_","=+",
|
||||
"qQ","wW","eE","rR","tT","yY","uU","iI","oO","pP","[{","]}","\\|",
|
||||
|
|
|
@ -146,9 +146,9 @@ function initWords() {
|
|||
}
|
||||
|
||||
function emulateLayout(event){
|
||||
if (config.layout == "qwerty")
|
||||
if (config.layout == "default")
|
||||
return event;
|
||||
const qwertyMasterLayout = {"Backquote":"`~","Digit1":"1!","Digit2":"2@","Digit3":"3#","Digit4":"4$","Digit5":"5%","Digit6":"6^","Digit7":"7&","Digit8":"8*","Digit9":"9(","Digit0":"0)","Minus":"-_","Equal":"=+","KeyQ":"qQ","KeyW":"wW","KeyE":"eE","KeyR":"rR","KeyT":"tT","KeyY":"yY","KeyU":"uU","KeyI":"iI","KeyO":"oO","KeyP":"pP","BracketLeft":"[{","BracketRight":"]}","KeyA":"aA","KeyS":"sS","KeyD":"dD","KeyF":"fF","KeyH":"hH","KeyJ":"jJ","KeyK":"kK","KeyL":"lL","Semicolon":";:","Quote":"'\"","Backslash":"\\|","KeyZ":"zZ","KeyX":"xX","KeyC":"cC","KeyV":"vV","KeyB":"bB","KeyN":"nN","KeyM":"mM","Comma":",<","Period":".>","Slash":"/?","Space":" "}
|
||||
const qwertyMasterLayout = {"Backquote":"`~","Digit1":"1!","Digit2":"2@","Digit3":"3#","Digit4":"4$","Digit5":"5%","Digit6":"6^","Digit7":"7&","Digit8":"8*","Digit9":"9(","Digit0":"0)","Minus":"-_","Equal":"=+","KeyQ":"qQ","KeyW":"wW","KeyE":"eE","KeyR":"rR","KeyT":"tT","KeyY":"yY","KeyU":"uU","KeyI":"iI","KeyO":"oO","KeyP":"pP","BracketLeft":"[{","BracketRight":"]}","KeyA":"aA","KeyS":"sS","KeyD":"dD","KeyF":"fF","KeyG":"gG","KeyH":"hH","KeyJ":"jJ","KeyK":"kK","KeyL":"lL","Semicolon":";:","Quote":"'\"","Backslash":"\\|","KeyZ":"zZ","KeyX":"xX","KeyC":"cC","KeyV":"vV","KeyB":"bB","KeyN":"nN","KeyM":"mM","Comma":",<","Period":".>","Slash":"/?","Space":" "}
|
||||
let layoutMap = layouts[config.layout];
|
||||
let qwertyMap = layouts["qwerty"];
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ let config = {
|
|||
quickEnd: false,
|
||||
caretStyle: "default",
|
||||
flipTestColors: false,
|
||||
layout:"qwerty"
|
||||
layout:"default"
|
||||
}
|
||||
|
||||
//cookies
|
||||
|
@ -67,7 +67,7 @@ function loadConfigFromCookie() {
|
|||
saveConfigToCookie();
|
||||
}
|
||||
if(config.layout == undefined){
|
||||
config.layout = "qwerty";
|
||||
config.layout = "default";
|
||||
saveConfigToCookie();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue