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

Instead of option_as_alt introduce command_as_alt and fix behaviour #1718

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Yaraslaut
Copy link
Member

@Yaraslaut Yaraslaut commented Feb 2, 2025

on my system macOS shows Sigma symbol when I press Option+W for example, same happening to other keybindings, maybe it is better to use command instead of option as an alt alternative on the macos then? @christianparpart
Also, PR fixes option_as_alt behaviour since we need to check for APPLE macro and send press event to trigger user key_mappings action

Closes #1607.

@github-actions github-actions bot added the frontend Contour Terminal Emulator (GUI frontend) label Feb 2, 2025
@christianparpart
Copy link
Member

I think I got inspired by some other app to map "option as alt". 🤔

@@ -445,7 +445,7 @@ struct TerminalProfile
ConfigEntry<HyperlinkDecorationConfig, documentation::HyperlinkDecoration> hyperlinkDecoration {};

ConfigEntry<std::string, documentation::WMClass> wmClass { CONTOUR_APP_ID };
ConfigEntry<bool, documentation::OptionKeyAsAlt> optionKeyAsAlt { false };
ConfigEntry<bool, documentation::CommandKeyAsAlt> commandKeyAsAlt { true };
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we really want to default to true here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that this is better for the default since user do not need to tweak config to use Alt+something key mappings on mac

@@ -246,7 +246,7 @@ profiles:
# This value is ignored on other platforms.
#
# Default: false
option_as_alt: false
command_as_alt: false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

above it says default is true, here false 🤔

@@ -398,6 +398,7 @@ void YAMLConfigReader::loadFromEntry(YAML::Node const& node, std::string const&
loadFromEntry(child, "insert_after_yank", where.insertAfterYank);
loadFromEntry(child, "bell", where.bell);
loadFromEntry(child, "wm_class", where.wmClass);
loadFromEntry(child, "command_as_alt", where.commandKeyAsAlt);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

option_as_alt was not removed?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, looks like it was not there since config refactor. oops :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend Contour Terminal Emulator (GUI frontend)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MacOS transform special symbols into expected key press
2 participants