openscad icon indicating copy to clipboard operation
openscad copied to clipboard

Console cmd+a works, but cmd+c doesn't

Open 3Dietrich opened this issue 2 years ago • 10 comments

OpenSCAD Version 2021.01 OpenSCAD Version 2022.01.20

@ macOS 12.0.1, MBAir 2020 M1

sometimes I want copy something out of the console. for copying I am very used to shortcut 'cmd+c'. But this doesn't work in console. cmd+a (select all) works, cmd+c doesn't.

3Dietrich avatar Jan 20 '22 17:01 3Dietrich

Yep, looks like we have to use the context (right click) menu to copy text in the console. Pressing command-c, even after targeting and selecting text in the console, still copies what is selected in the editor. Looks like the select all behavior is inherited from QT or QScintilla, as OpenSCAD doesn't even have a menu item for it.

ChrisCoxArt avatar Jan 24 '22 01:01 ChrisCoxArt

The Console pane is unrelated to QScintilla, it is a Qt QPlainTextEdit widget. Ctrl-C in the Console works for me on Linux, FWIW.

Sounds like something strange is going on with focus on Mac, where its being forced back to the editor.

thehans avatar Jan 24 '22 01:01 thehans

On Windows 7 & 2021.01, when the console has focus from a click, ctrl-a doesn't work, with selected text ctrl-c does work.

Both are on the context menu, 'Copy' has the underlined C shortcut, 'Select All' doesn't - it is usually an underlined A, sometimes 'l' (that's lower L).


From: Hans Loeblich @.*** Sent: Mon, 24 Jan 2022 12:55 To: openscad/openscad Cc: Subscribed Subject: Re: [openscad/openscad] Console cmd+a works, but cmd+c doesn't (Issue #4060)

The Console pane is unrelated to QScintilla, it is a Qt https://doc.qt.io/qt-5/qplaintextedit.html QPlainTextEdit widget. Ctrl-C in the Console works for me on Linux, FWIW.

Sounds like something strange is going on with focus on Mac, where its being forced back to the editor.

— Reply to this email directly, view https://github.com/openscad/openscad/issues/4060#issuecomment-1019640560 it on GitHub, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAPBVYMBFT4C6F4UGPJR6UTUXSWQZANCNFSM5MNKP3VQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub . You are receiving this because you are subscribed to this thread. https://github.com/notifications/beacon/AAPBVYLYUGH43TEORVWDRP3UXSWQZA5CNFSM5MNKP3V2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOHTDHV4A.gif Message ID: @.***>

-- This email has been checked for viruses by AVG. https://www.avg.com

MichaelAtOz avatar Jan 24 '22 04:01 MichaelAtOz

On MacOS Mojave and Monterey, neither command-C nor copy from the Edit menu work for me. Copy from the context menu does.

On Ubuntu 20.04 Ctrl-C does, copy from the context menu does, but copy from the Edit menu does not.

RAMilewski avatar Jun 30 '22 21:06 RAMilewski

@RAMilewski wrote:

... copy from the Edit menu ...

I'm pretty sure this is intended to copy from the Editor pane only, not the Console. Hence why it doesn't work on Mac nor Linux for you.

thehans avatar Aug 11 '22 00:08 thehans

Ctrl+C works from the Console in Windows. (But only when the Console has focus, as hinted by the fact that the highlight goes away when focus moves.)

But Edit/Copy does not.

It is probably relevant that the context menu in the Console has Copy/Ctrl+C and Select All/Ctrl+A on it.

jordanbrown0 avatar Aug 11 '22 00:08 jordanbrown0

In Windows, Ctrl+A does work in the Console. (Windows 10, but I doubt that's relevant.)

jordanbrown0 avatar Aug 11 '22 00:08 jordanbrown0

I think I have a solution to this, in PR #4326. These changes should also allow the Edit->Copy menu to be used on either Editor or Console.

I've only tested on Linux Mint 22. I don't have access to a mac to verify that this fixes the original issue of cmd-c shortcut in Console. But if @ChrisCoxArt or @3Dietrich can test the build here, then we can get it merged to master and wrap up this issue.

thehans avatar Aug 13 '22 22:08 thehans

Or @RAMilewski ... or anyone else with a mac that could test? Bueller?

thehans avatar Aug 18 '22 19:08 thehans

Or @RAMilewski ... or anyone else with a mac that could test? Bueller?

YES! I could copy selected content from the Console Window into an editor. @thehans

3Dietrich avatar Aug 18 '22 19:08 3Dietrich