Skip to content

Commit

Permalink
terminal: fix Ctrl+C not working
Browse files Browse the repository at this point in the history
Fixes #327
  • Loading branch information
osy committed May 18, 2020
1 parent 342fdb8 commit 9b63f3d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Views/HTerm/terminal.js
Expand Up @@ -120,8 +120,12 @@ function captureKeypressHandler(event) {
}

function eventDataUsingModifierTable(sourceEvent) {
var keyCode = sourceEvent.keyCode;
if (sourceEvent.key.toLowerCase() == 'c' && sourceEvent.keyCode == 13) {
keyCode = 67; // Issue #327, iOS WebKit translates Ctrl+C incorrectly
}
return {
keyCode: sourceEvent.keyCode,
keyCode: keyCode,
charCode: sourceEvent.charCode,
location: sourceEvent.location,
which: sourceEvent.which,
Expand Down

0 comments on commit 9b63f3d

Please sign in to comment.