ETC
[JavaScript] 타이핑웍스 엔터키로 넘기기 안될 때 (작은 창)
1984
2023. 5. 25. 20:21
타이핑웍스 윈도우창을 작게하면, phone으로 인식되어 엔터키가 줄바꿈으로 인식됨.
twsAgent.prototype.change = function () {
this.phone = false;
this.tablet = false;
this.pc = true;
switch (!0) {
case this.phone:
twsOptIpt("phone"),
tws.langBox.display(tws.lang, "phone"),
tws.timeBox.display(tws.ttSelect, "phone"),
tws.timeBox.timesDP(tws.times, "phone"),
tws.timeBox.timerDP(tws.timer, "phone"),
tws.stnBox.btnDP(tws.short, "phone"),
tws.pgBox.display(tws.pangram, "phone"),
ask.req.close(document.getElementById("reqExit"));
break;
case this.tablet:
twsOptIpt("tablet"),
tws.langBox.display(tws.lang, "tablet"),
tws.timeBox.display(tws.ttSelect, "tablet"),
tws.timeBox.timesDP(tws.times, "tablet"),
tws.timeBox.timerDP(tws.timer, "tablet"),
tws.stnBox.btnDP(tws.short, "tablet"),
tws.pgBox.display(tws.pangram, "tablet"),
tws.menu.close("tablet");
break;
case this.pc:
twsOptIpt("pc"),
tws.langBox.display(tws.lang, "pc"),
tws.timeBox.display(tws.ttSelect, "pc"),
tws.timeBox.timesDP(tws.times, "pc"),
tws.timeBox.timerDP(tws.timer, "pc"),
tws.stnBox.btnDP(tws.short, "pc"),
tws.pgBox.display(tws.pangram, "pc"),
tws.menu.close("pc");
}
};
window.addEventListener("keydown", function (t) {
if (t.key === "Enter") {
t.preventDefault();
return;
}
});
728x90