Skip to content

Commit

Permalink
fix(ui): fix keyboard with command key
Browse files Browse the repository at this point in the history
  • Loading branch information
shiyiya committed Jan 6, 2024
1 parent b76e834 commit f59916a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/ui/src/functions/keyboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,14 @@ export default function (it: UIInterface) {
function keydown(e: KeyboardEvent) {
if (
document.activeElement?.tagName == 'INPUT' ||
document.activeElement?.tagName == 'TEXTAREA' ||
document.activeElement?.getAttribute('contenteditable') ||
(!config.keyboard?.global && !config.keyboard?.focused) ||
(config.keyboard.focused && !isFocused(player))
(config.keyboard.focused && !isFocused(player)) ||
!e.altKey ||
!e.ctrlKey ||
!e.metaKey ||
!e.shiftKey
) {
return
}
Expand Down

1 comment on commit f59916a

@vercel
Copy link

@vercel vercel bot commented on f59916a Jan 6, 2024

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

oplayer – ./

oplayer.vercel.app
oplayer-shiyiya.vercel.app
oplayer-git-main-shiyiya.vercel.app

Please sign in to comment.