Skip to content

Creating square brackets #412

Open
Open
@LenniM

Description

@LenniM

Version
2.1.1

Short overview
Not able to create square brackets through "pressKey"-event and "type"-event.

Issue occurs on
This issue occurred on the Windows operating system.

Replication

const { keyboard , Key} = require('@nut-tree/nut-js');

const ret = globalShortcut.register('Up', async () => {

        await keyboard.type(Key.RightBracket)

        // await keyboard.pressKey(Key.RightBracket) --> isn't working either
        // await keyboard.releaseKey(Key.RightBracket) --> isn't working either

})

Activity

added this to the TipTap milestone on Jun 30, 2022
github-actions

github-actions commented on Jul 31, 2022

@github-actions

This issue is stale because it has been open for 30 days with no activity.

s1hofmann

s1hofmann commented on Aug 5, 2022

@s1hofmann
Member

Hey @LenniM 👋

Could you please provide some additional context?

Which keyboard layout are you using?
And does it generate any unexpected output instead?

Best regards

Simon

LenniM

LenniM commented on Aug 5, 2022

@LenniM
Author

Hi @s1hofmann,

thanks for commenting!

Sure, I am trying to create a shortcut, triggering a specific action for a specific program (which is triggered through "]").

I am using a German keyboard layout (which could be the cause of the problem).
When I use "keyboard.type(Key.RightBracket)" it returns a 9.

The typical way to create a "]" on a German keyboard is pressing right alt and 9. Thus, I have tried to create a bracket through using "keyboard.type(Key.Alt, Key.RightBracket)" - but that also generates a 9.

It doesn't return any error or any other unexpected output.

I hope this helps. If you have any further questions, then feel free to ask.

Best regards

Lenni

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @s1hofmann@LenniM

        Issue actions

          Creating square brackets · Issue #412 · nut-tree/nut.js