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
Copy/Paste to terminal dosen't work in MacOSX #3
Comments
|
Could you check what is keyCode and charCode of these keys and the value of ctrlKey and metaKey |
|
Sorry for the delay. Listed below is some console output from the key events. Here is more documentation on working with the branded key codes: http://unixpapa.com/js/key.html Google Chrome: Right FireFox Right |
|
Actually I want to know Command+C and Command+V "keyCode", "charCode" and "which" in keypress and keydown. What left and right mean? |
|
This issue seems to have not been solved. I can't paste anything in the terminal. Using: Mac OSX 10.7.2 |
|
It's hard for me to test but I ask one person some time ago if he can paste code into terminal, and he could he use Opera and Chrome I believe. Maybe it was not fix or I introduce new bug (the same one) again when I fix other bugs. Can you paste into terminal in other Browsers? Are you using command+V (I didn't aks that person if he use command), does MacOS have control key that this user maybe used? |
|
I initially opened this issue and did some testing. However I don't have the same environment any more to recreate the tests. In my last update I have posted the meta and ctrl key data of using command+v. To answer the question of what left vs right means. It means there are two command keys on a Mac keyboard. Left and right. That is corresponding key status for both of them. |
|
I'm using chrome on kubuntu. |
|
@tkoomzaaskz Added with this commit 645ae7e |
|
great thanks, Kuba 👍 |
|
I think it's a timing issue. If I hold down the command-V it sometimes works. My guess is that this code isn't right. either the browser has already put the text somewhere before the focus was switched to the clipboard div or the it didn't wait long enough. |
|
@abersnaze thanks for your observation, helped! when I put the code in a setTimeout(... , 1000) - the paste works fine. But I also had to make the paste() trigger on CMD+V - it did not work for CLTR+V and I don't know how to type SHIFT+Insert on my Macbook Pro keyboard:). (I'm working with Chrome on Mac.) I'll submit a PR if I ever get some free time to get back to this. |
|
We have jquery terminal in a project here and are seeing a reoccurrence of this problem - most of our developers are using Macs. |
|
any update on this issue? It is really annoying... |
|
@sheymann I don't have a way to test it. You can try @abersnaze solution just put 100, instead of 1 and check what is If you make it work, you can create PR (modify jquery.terminal-src.js file). |
|
Finally a friend of mine test, 100ms work. It's in devel branch will be in version 0.9. |
|
I tried devel branch (2498aa4) on Mac OS X (10.9.4). It worked in Google Chrome (version 36.0.1985.125), but not in Firefox (version 31.0) nor Safari (version 7.0.5 (9537.77.4)). Let me know if you want to test with other settings. |
|
@eitoball Can you test by changing delay to 500 and 1000? It's line 1290 in devel branch |
Sure.
(*1) If you try to press Command+v a couple of times, it works. This is test code I use. <!DOCTYPE HTML>
<html>
<head>
<link href="css/jquery.terminal-0.9.0_dev.css" rel="stylesheet">
</head>
<body>
<div id="term_demo">
</div>
<script src="js/jquery-1.7.1.min.js"></script>
<script src="js/jquery.terminal-0.9.0_dev.js"></script>
<script>
$(function($, undefined) {
$('#term_demo').terminal(function(command, term) {
if (command !== '') {
var result = window.eval(command);
if (result != undefined) {
term.echo(String(result));
}
}
} , {
greetings: 'Javascript Interpreter',
name: 'js_demo',
height: 200,
width: 450,
prompt: 'js>'
});
});
</script>
</body>
</html>When I reported first, I tried with JQuery 2.1.1. Maybe that is reason for different results in Firefox. |
|
Maybe this will be fixed if I keep focus in textarea all the time, and do the same as for mobile. I think that I'll need to do this for #86 |
|
Can anybody test on a Mac? I now use paste event if supported. Work on Linux Chrome and Firefox, don't have time to test on more browsers. |
|
@romanman I don't have access to Mac so I can't work on this issue. I've try to install OSX on virtual box but was not able to. |
|
@jcubic : actually I have it on Windows 10 Chrome , |
|
I'll try to install windows 10 on virtual box. |
|
@jcubic , thanks is it that big difference , |
|
People report issues with Copy/Paste on Windows and Mac and I don't see any on linux so there must be differences. |
|
It seems that codalab fixed the issue, can you take a look at https://github.com/codalab/codalab-worksheets/blob/develop/codalab/apps/web/static/js/custom/jquery.terminal-0.8.8_custom.js if it works? It's old 0.8.8 but copy paste should work, I'll take that code and incorporate it in devel branch. |
|
Anyone? Can you test that file in previous comment? |
|
@jcubic First I tested on Mac. Mentioned file fixed copy/paste in one browser and broke in another. I looked which changes this file brings, comparing to original 0.8.8 version. I had luck to find out that few lines were removed. So I restored them and it became working on both Win/Mac FF/Chrome. https://gist.github.com/cupuyc/7281eef0a19b3f4daf459f5dc1f291df |
|
Can you change without that content editable, is it needed? |
|
What about Safarii? Can you test if this return true or false in Safarii and Firefox on a Mac? |
|
Can somebody test devel branch version on a Mac Chrome/Firefox/Safari? |
|
Devel branch works on my mac in Chrome 51.0.2704.84, Firefox 48.0.2 and Safari 9.1.3 (11601.7.8) 👍 :) |
|
Awesome, thanks. |
|
Can somebody test this version in MacOSX chrome/firefox/safari? https://gist.github.com/jcubic/ce02aab838b9bdbb72761e20223f9b63 I've commented out content editable code that was created by codalab, it look like it's not needed, but I want to be sure. |
|
Works 👍 , tested in the same browsers as stated above. |
|
Great thanks again. |
|
Still a problem for Mac OS X + firefox |
Fix for #3 Firefox MacOS paste problem in 1.0
|
Will be fixed in 1.0.7 |
|
Can anybody test devel version on a Mac? http://codepen.io/jcubic/pen/LxgJQG |
|
Tested on VirtualBox it work. |
Have Tested in Chrome, Safari, FF3
MacOSX uses the apple/option meta keys + c / v for copy paste the jQuery terminal code is not acknowledging these key combos
The text was updated successfully, but these errors were encountered: