フィルターのクリア

Character for "ENTER"

8 ビュー (過去 30 日間)
Hg
Hg 2017 年 2 月 28 日
編集済み: Hg 2017 年 2 月 28 日
I want to break a loop by pressing ENTER key. What character does ENTER key represent?
while (1)
if strcmp(get(gcf,'currentcharacter'),'??');
break;
end
end

採用された回答

Walter Roberson
Walter Roberson 2017 年 2 月 28 日
Use CurrentKey 'Enter'
Otherwise, char(10)
  1 件のコメント
Hg
Hg 2017 年 2 月 28 日
編集済み: Hg 2017 年 2 月 28 日
It seems like char(10) is for Windows. In my case, which is Windows on a Macbook, only char(13) works.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeWhos についてさらに検索

タグ

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by