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

Copy selected text in terminal using CMD+c on macOS doesn't work #1379

Closed
erf opened this issue Dec 22, 2023 · 15 comments · Fixed by #1382
Closed

Copy selected text in terminal using CMD+c on macOS doesn't work #1379

erf opened this issue Dec 22, 2023 · 15 comments · Fixed by #1382
Labels
enhancement New feature or request feature-request User requested features frontend Contour Terminal Emulator (GUI frontend) platform: osx topics that directly address OS/X platform

Comments

@erf
Copy link

erf commented Dec 22, 2023

Abstract

Copy selected text in terminal using CMD+c on macOS doesn't work. This is possible on other popular macOS terminals.

Motivation

Specification

@erf erf added enhancement New feature or request feature-request User requested features labels Dec 22, 2023
@whisperity whisperity added platform: osx topics that directly address OS/X platform frontend Contour Terminal Emulator (GUI frontend) labels Dec 22, 2023
@christianparpart
Copy link
Member

@erf Did you build from source? If so, would you mind trying out the linked PR branch? Keep in mind, that the Command key is called Meta (to be somewhat more unified with other platforms, such as Windows and Linux).

Should we add Command as modifier name as well, to make it feel more MacOS-alike?

@erf
Copy link
Author

erf commented Dec 23, 2023

Previously i installed via homebrew, but i managed to install it from source now (adding lots of deps to homebrew..).

Control-c now works to copy, but on macOS Command-c is the default key so should use that for macOS.

BTW when i'm typing after building from source, input is all CAP's.

@christianparpart
Copy link
Member

Merry Christmas, @erf 🎄

BTW when i'm typing after building from source, input is all CAP's

Please, I do not understand this sentence. What did you mean by that?

EDIT: Okay, now I understand. I fixed that.

I've also merged #1382 to master now. This at least fixed Command + C/V for me. I'd love you to confirm that.

input_mappings:
    # ...
    - { mods: [Command],        key: C,             action: CopySelection, mode: 'Select' }
    - { mods: [Command],        key: C,             action: CancelSelection, mode: 'Select|Insert' }
    - { mods: [Command],        key: V,             action: PasteClipboard }
    # ...

@erf
Copy link
Author

erf commented Dec 24, 2023

Merry Christmas 🎅

I got the latest from master and tried to build now but when i do:

cmake --build build/

I get the error:

ld: can't write output file: src/contour/contour.app/Contents/MacOS/contour

Which is maybe not the correct output path?

@christianparpart
Copy link
Member

Sorry @erf for replying late. Did you fix it by now? Maybe you cannot write that file when it is currently being executed. Otherwise I would probably fully remove the build dir and recompile freshly. 🤔

@erf
Copy link
Author

erf commented Dec 27, 2023

I got it building after deleting the build folder, but I still have to press Control-c to copy. Command-c does not work.

BTW when i build i get a bunch of these QT errors ( i still seem to build though):

ERROR: Cannot resolve rpath "@rpath/QtCore.framework/Versions/A/QtCore"
ERROR:  using QList("/Users/erlend/projects/contour/build/lib")
ERROR: Cannot resolve rpath "@rpath/QtQml.framework/Versions/A/QtQml"
ERROR:  using QList("/Users/erlend/projects/contour/build/lib")
ERROR: Cannot resolve rpath "@rpath/QtNetwork.framework/Versions/A/QtNetwork"
ERROR:  using QList("/Users/erlend/projects/contour/build/lib")
ERROR: Cannot resolve rpath "@rpath/QtCore.framework/Versions/A/QtCore"
ERROR:  using QList("/Users/erlend/projects/contour/build/lib")
ERROR: Cannot resolve rpath "@rpath/QtVirtualKeyboard.framework/Versions/A/QtVirtualKeyboard"
...

@uspasojevic96
Copy link
Member

uspasojevic96 commented Dec 27, 2023

Did you update your contour config to use Command instead of Control?

As for the errors, those are runtime... @christianparpart what step is he missing?

@erf
Copy link
Author

erf commented Dec 27, 2023

Oh do i have to update the config manually? I thought it would be the default mapping on macOS

@erf
Copy link
Author

erf commented Dec 27, 2023

After i update the key commands manually it works - i would however prefer is this was the default on macOS.

BTW i noticed the executable is not copied to the Applications folder on install on macOS but rather to:

~ % /usr/local/contour.app/Contents/MacOS/contour

@christianparpart do you have a mac to test on?

@uspasojevic96
Copy link
Member

uspasojevic96 commented Dec 27, 2023

BTW i noticed the executable is not copied to the Applications folder on install on macOS but rather to:

~ % /usr/local/contour.app/Contents/MacOS/contour

That is correct, you didn't change the install path of cmake

@christianparpart do you have a mac to test on?

He does

@erf
Copy link
Author

erf commented Dec 27, 2023

That is correct, you didn't change the install path of cmake

Is this mentioned anywhere?

@uspasojevic96
Copy link
Member

That is correct, you didn't change the install path of cmake

Is this mentioned anywhere?

https://cmake.org/cmake/help/v3.0/variable/CMAKE_INSTALL_PREFIX.html

It's there by default

@christianparpart
Copy link
Member

i would however prefer is this was the default on macOS

This is going to become the default eventually. We're in the middle of reworking configuration loading implementation in #1300. With that, we're then also making sure to provide sane defaults for the platform in question. :)

ERROR: Cannot resolve rpath "@rpath/QtCore.framework/Versions/A/QtCore"
ERROR: using QList("/Users/erlend/projects/contour/build/lib")

I am getting these errors too, when I'm building locally. I am really no MacOS pro (even though I'm using one, I'm more the Linux guy). If someone knows how to help out here, I'd be more than happy. (I was just recently fighting Mac + Qt install process until 🥵 💥)

~ % /usr/local/contour.app/Contents/MacOS/contour

You need to set CMAKE_INSTALL_PREFIX to /Applications I think

@erf
Copy link
Author

erf commented Dec 28, 2023

Would it be possible to set CMAKE_INSTALL_PREFIX automatically based on platform as a build step?

@christianparpart
Copy link
Member

christianparpart commented Dec 28, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feature-request User requested features frontend Contour Terminal Emulator (GUI frontend) platform: osx topics that directly address OS/X platform
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants