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

Catch ctrl+shift+c #59

Open
Privat33r-dev opened this issue May 3, 2024 · 9 comments
Open

Catch ctrl+shift+c #59

Privat33r-dev opened this issue May 3, 2024 · 9 comments

Comments

@Privat33r-dev
Copy link

Currently there is no way to copy text from the console. Usual combination ctrl+c triggers the escape code "^C", which is a valid response, but I don't see a workaround for text copying. ctrl+shift+c calls the developer tools in chrome-based browsers.

@marcosnils
Copy link
Contributor

Currently there is no way to copy text from the console. Usual combination ctrl+c triggers the escape code "^C", which is a valid response, but I don't see a workaround for text copying. ctrl+shift+c calls the developer tools in chrome-based browsers.

have you tried ctrl + inser to copy and shift + insert to paste? that should work

@Privat33r-dev
Copy link
Author

Privat33r-dev commented May 3, 2024

Currently there is no way to copy text from the console. Usual combination ctrl+c triggers the escape code "^C", which is a valid response, but I don't see a workaround for text copying. ctrl+shift+c calls the developer tools in chrome-based browsers.

have you tried ctrl + inser to copy and shift + insert to paste? that should work

Thanks, I just found out about that in the upstream's discussion xtermjs/xterm.js#2478

I think that it should be documented since even right mouse button click copying doesn't work by some reason (no option in context menu).

Alternatively, ctrl+shift+c event could be caught.

@marcosnils
Copy link
Contributor

I think that it should be documented since even right mouse button click copying doesn't work by some reason (no option in context menu).

it's documented here: https://github.com/play-with-docker/play-with-docker/?tab=readme-ov-file#how-can-i-use-copy--paste-shortcuts

@marcosnils
Copy link
Contributor

Alternatively, ctrl+shift+c event could be caught.

I'd prefer not to do it since it overrides the browser defaults in some cases. I personally don't like overriding browser default behavior

@Privat33r-dev
Copy link
Author

it's documented here: https://github.com/play-with-docker/play-with-docker/?tab=readme-ov-file#how-can-i-use-copy--paste-shortcuts

PWD have tech-savvy userbase, but should it be expected that they will read the repository's README? Maybe the hint can be provided somewhere on the frontend.

Example

Original

image

Changed to

image

It feels natural, there are other ideas (miniFAQ on server start), but I am not sure about them, this one feels as the easiest solution (though it should be implemented downstream).

@marcosnils
Copy link
Contributor

but I am not sure about them, this one feels as the easiest solution (though it should be implemented downstream).

Yeah.. this one is tricky given that users in training.play-with-docker.com won't be able to see it 🙏

@Privat33r-dev
Copy link
Author

but I am not sure about them, this one feels as the easiest solution (though it should be implemented downstream).

Yeah.. this one is tricky given that users in training.play-with-docker.com won't be able to see it 🙏

TryHackMe, for example, has a special room that explains how to use rooms. Well, I guess that some general FAQ/help, reference to the button can be added in the machine's footer.

I'd also suggest to do something with footer and header, moving them only on the left part like it's done here (though it's a topic for other issue). And then making a small control element on the bottom, showing timer, machine state and FAQ button + control element to restart machine.

image

@marcosnils
Copy link
Contributor

I'd also suggest to do something with footer and header, moving them only on the left part like it's done here (though it's a topic for other issue). And then making a small control element on the bottom, showing timer, machine state and FAQ button + control element to restart machine.

yes, that'd be awesome. This requires bit of work that unfortunately I don't have the bandwidth to pursue ATM 😬

@Privat33r-dev
Copy link
Author

yes, that'd be awesome. This requires bit of work that unfortunately I don't have the bandwidth to pursue ATM 😬

I can do that :)

Btw, what do you think about referral link to the TryHackMe as they have similar rooms, so if people want to continue their education on cybersecurity in a similar way (web rooms), some users can continue with them? I got the idea when I noticed the similarities.

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

No branches or pull requests

2 participants