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

Use Magic Keys Issue in vue3 + vite in ubuntu #3952

Open
7 tasks done
fwt-parth-jariwala opened this issue May 4, 2024 · 0 comments
Open
7 tasks done

Use Magic Keys Issue in vue3 + vite in ubuntu #3952

fwt-parth-jariwala opened this issue May 4, 2024 · 0 comments

Comments

@fwt-parth-jariwala
Copy link

fwt-parth-jariwala commented May 4, 2024

Describe the bug

I am attaching event to F9 key in my vue app like below:

const { F9 } = useMagicKeys({
    passive: false,
    onEventFired(e) {
        if (e.key === 'F9' && e.type === 'keydown') {
            if(e.ctrlKey) {
                ........................
            } else if(!e.ctrlKey) {
                ........................
            }
        }
    }   
})

How can i attach event to alt + F9 key using above example it is not attaching event to app.
I also have written like below:
const { ALT_F5 } = useMagicKeys({});

whenever(ALT_F5,(v) => {
if(v) alert('ALT_F5');
})
image

Reproduction

https://vueuse.org/core/useMagicKeys/

System Info

Ubuntu 20.04
Node: v18.19.0
NPM: 10.2.2

Used Package Manager

npm

Validations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant