Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[lem-pdcurses] Use escape-delay variable #437

Merged
merged 2 commits into from
Nov 3, 2019

Conversation

Hamayama
Copy link
Collaborator

@Hamayama Hamayama commented Oct 11, 2019

  • Make escape-delay configurable #423 の escape-delay に対応しました。

  • 今までは、Escape キーの入力があったときにフラグを立てて、
    次の入力を M-x として解釈するようにしていました。
    しかし、以下の問題がありました。
    (1) 単独の Escape キーを入力したあとに、何かキーを押すと M-x になってしまう
    (2) C-x M-x のようなキーバインドを入力できない (単独の Escape 入力が間に挟まるため)

  • 今回、フラグを削除してタイマーのみにしました。
    (lem-ncurses と同じにしました)

  • ただ、現状の PDCurses には、
    Alt キーと同時押しで入力できない組み合わせがあり (M-<, M->, M-; 等)、
    それらを入力するには Escape キーとの組み合わせが必要になります。

  • そのときにタイムアウトが 100 msec だと、ちょっと入力できなかったため、
    デフォルト値は 1000 msec にしました。

  • vi-mode を使用する等で、短い値にしたい場合には、
    init.lisp に以下のように記述してください。

    #+(and win32 lem-ncurses)
    (setf (variable-value 'lem-ncurses::escape-delay :global) 100)
    
  • あと、いろいろテストしていて、winpty に不具合が見つかったため、報告しました。
    Workaround for the confusion of 'escape key input + DSR reply' and 'LAlt-Shift-F3' rprichard/winpty#175
    (現状、mintty+winpty を使用していて、1行目の2~8桁目にカーソルを置いて、
    Escape キーを押すと、Escape キーがうまく機能しなくなります。
    復旧するには、lem (つまり winpty) の再起動が必要です。。。)

@Hamayama
Copy link
Collaborator Author

Escape キーを押してすぐに画面サイズを変更すると、
変な状態になっていたため直しました。

@snmsts snmsts merged commit 971e7f2 into lem-project:master Nov 3, 2019
@Hamayama Hamayama deleted the pdcurses-escape branch January 24, 2020 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants