###前提・実現したいこと
3つのパターンをキーボードで制御したいと考えております。
0. enter
- control + enter
- control + option + enter
###発生している問題・エラーメッセージ
現状 MacbookAirでは問題なく制御出来ているのですが、Windows機ですと1のパターンしか動作しないという状況です。
###該当のソースコード
function startFunc() { $("body").keypress( function( event ) { if( event.ctrlKey === false && event.which === 13 ){ console.log('start'); } }); } function endFunc() { $("body").keypress( function( event ) { if( event.ctrlKey === true && event.altKey === false && event.which === 13 ){ console.log('end'); } }); } function saveFunc() { $("body").keypress( function( event ) { if( event.ctrlKey === true && event.altKey === true && event.which === 13 ){ console.log('save'); } }); }
###補足情報(言語/FW/ツール等のバージョンなど)
試したマシン
macOS Sierra 10.12.4 (macbook air mid-2012)
windows 7 (lenovo T410-S)
ブラウザ
Google Chrome 58.0.3029.110 (64-bit)
回答3件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/05/26 01:47
2017/05/26 03:30
2017/05/26 05:28 編集
2017/05/26 05:31
2017/05/26 05:37