Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Allow hotkey to be triggered when input or textfield is focused under certain conditions#48

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
khiga8 wants to merge1 commit intomainfromkh-allow_modifier

Conversation

khiga8
Copy link
Contributor

Relates tohttps://github.com/github/github/pull/193266

Currently we don't allow hotkeys to be triggered when the focus is on textfield or input.
We should allow hotkeys to be triggered as long as the hotkey involves a modifier.

@khiga8khiga8 requested a review froma team as acode ownerSeptember 16, 2021 19:41
@khiga8khiga8 marked this pull request as draftSeptember 16, 2021 19:41
<input id="textfield" />`)
document.getElementById('textfield').dispatchEvent(newKeyboardEvent('keydown',{metaKey:true,key:'7'}))
assert.include(elementsActivated,'button1')
})
Copy link
ContributorAuthor

@khiga8khiga8Sep 16, 2021
edited
Loading

Choose a reason for hiding this comment

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

I copied the test above.

I confirmed this change in the browser, but I'm not sure this test setup is correctly simulatinguser is focused on a input or textfield since test is failing:

document.getElementById('textfield').dispatchEvent

<body>

<buttononclick="alert('clicked!')"data-hotkey="d">pressd to click this button</button><br>
<buttononclick="alert('clicked!')"data-hotkey="Meta+Shift+8,Control+Shift+8">presscmd+shift+8 or ctrl+shift+8 to click this button</button><br>
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Updating examples to include more "complex" bindings.

@khiga8
Copy link
ContributorAuthor

Closing for now! Not sure we would want global hotkeys for this usecase.

@khanxmetu
Copy link

Hi@khiga8,

I think this could be a useful feature and GitHub's own command palette might serve as a good use case

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@keithamuskeithamusAwaiting requested review from keithamuskeithamus is a code owner automatically assigned from github/web-systems-reviewers

@JoseInTheArenaJoseInTheArenaAwaiting requested review from JoseInTheArenaJoseInTheArena is a code owner automatically assigned from github/web-systems-reviewers

Copilot code reviewCopilotAwaiting requested review from CopilotCopilot will automatically review once the pull request is marked ready for review

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@khiga8@khanxmetu

[8]ページ先頭

©2009-2025 Movatter.jp