Skip to content

Open the context menu on Alt-Return #133

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions src/AppButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,17 @@ export default function AppButton({ appInfo, content_type, entry, window }) {
});
}

if (
(keyname === "Return" || keyname === "space") &&
modifier_state & Gdk.ModifierType.CONTROL_MASK
) {
open(false);
if (keyname === "Return" || keyname === "space" || /^\d$/.test(keyname)) {
if (modifier_state & Gdk.ModifierType.ALT_MASK) {
popupActionsMenu({
appInfo,
popoverMenu,
location: entry.get_text(),
});
} else {
open(!(modifier_state & Gdk.ModifierType.CONTROL_MASK));
}
controller_key.set_state(Gtk.EventSequenceState.CLAIMED);
Copy link
Owner

Choose a reason for hiding this comment

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

TypeError: controller_key.set_state is not a function

}
},
);
Expand Down
5 changes: 0 additions & 5 deletions src/window.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,6 @@ export default function Window({ application, file }) {
button?.grab_focus();
return !!button;
});
eventController.connect("key-released", (self, keyval) => {
const button = getButtonForKeyval(keyval);
button?.activate();
return !!button;
});
Comment on lines -96 to -100
Copy link
Owner

Choose a reason for hiding this comment

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

Your version doesn't do the same thing as this.

This highlights the entry before opening the browsing showing the user which browser is gonna open before Juncton closes. It's subtitle but you should be able to tell the difference.

Please revert

window.add_controller(eventController);

function copyToClipboard() {
Expand Down