Notice
Recent Posts
Recent Comments
Link
«   2024/11   »
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
Tags
more
Archives
Today
Total
관리 메뉴

main

[JavaScript] 타이핑웍스 엔터키로 넘기기 안될 때 (작은 창) 본문

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
Comments