Skip to content

Gotobrace function not working #556

Closed

Description

Environment data

PS version: 5.1.15063.608
PSReadline version: 1.2
PS file version: 10.0.15063.0 (WinBuild.160101.0800)

Steps to reproduce or exception report

Using CTRL+} to jump to the matching brace does nothing.
Tried to add another hotkey to it but it isn't working either.

Activity

  1. lzybkr commented on Sep 16, 2017

    @lzybkr
    Contributor

    I'll need more information on how to repro - the unit test is passing, see the test here and I quickly tried to repro and it works fine.

  2. vandreytrindade commented on Sep 16, 2017

    @vandreytrindade
    Author

    Hi, if I press CTRL+[ in my computer and in the computer at work, PowerShell inserts this char: ^[

  3. lzybkr commented on Sep 16, 2017

    @lzybkr
    Contributor

    The key binding you want is CTRL+]

    You can use the key binding WhatIsKey (bound to Alt+?) to see what a specific key is bound to, and you'll see CTRL+[ is bound to SelfInsert which explains why you saw ^[ on the screen.

  4. vandreytrindade commented on Sep 19, 2017

    @vandreytrindade
    Author

    Hy Izybkr,

    Sorry for the delay.
    Here is my output when I press the CTRL+SHIFT+ALT+: (ALT+? just shows a / for me):

    http://uploads.im/Bgicr.png

    For me it shows the CTRL+[ for the function GotoBraces.

    But I think that the problem is happening because of this:
    https://superuser.com/questions/1144685/powershell-context-menu-shortcuts-such-as-ctrlm-dont-work

  5. lzybkr commented on Sep 19, 2017

    @lzybkr
    Contributor

    I see - which keyboard do you use?

    I'm revisiting the keybinding code at the moment, I have a feeling my new approach will magically fix this for you.

  6. vandreytrindade commented on Sep 19, 2017

    @vandreytrindade
    Author

    Izybkr,

    I'm using Português (Brasil ABNT2) QWERTY.

  7. vandreytrindade commented on Sep 25, 2017

    @vandreytrindade
    Author

    Hi,

    Any news?

  8. lzybkr commented on Sep 25, 2017

    @lzybkr
    Contributor

    Sorry, no news - this is still a side project for me and I've been short on spare time lately. I'm hoping I'll find some time next week, but we'll see.

  9. vandreytrindade commented on Sep 26, 2017

    @vandreytrindade
    Author

    Sorry man... I thought it was an easy fix. No problem! No rush in that =]
    Thanks a lot for your time!

  10. lzybkr commented on Oct 16, 2017

    @lzybkr
    Contributor

    I believe this is fixed in #561.

    I'll publish a pre-release version to the PowerShell Gallery as soon as they support pre-releases.

    If you'd like to try a fix before that, you can build the lastest yourself from the master branch, or
    grab a build from AppVeyor like this one.

    Note the version number is now 2.0, so be sure to copy the contents to \PSReadLine\2.0.

  11. lzybkr commented on Nov 4, 2017

    @lzybkr
    Contributor

    I'll have an official prerelease build out next week if you want to verify this is fixed, otherwise you can grab a build out of appveyor here.

  12. vandreytrindade commented on Nov 27, 2017

    @vandreytrindade
    Author

    Izybkr,
    Sorry, I just don't know how to try it without appearing in the PowerShell Gallery.
    I'll wait for you to release the 2.0 version on it to test it.

  13. vandreytrindade commented on Feb 16, 2018

    @vandreytrindade
    Author

    Izybkr,

    The problem is not with your module.
    Windows 10 PowerShell windows don't let us use the CTRL+key special functions.
    If I open cmd and press CTRL+F it works, on PowerShell only if I press it very quickly when I just opened the window it work. Later I only get the ^F characters...
    That's why I can't use the ALT+? shortcut to your WhatIsKey function.

    There's been a lot of time since this problem and Microsoft doesn't seem to care.

  14. vandreytrindade commented on Feb 16, 2018

    @vandreytrindade
    Author

    Izybkr,

    Actually, I tried removing your module and it works on PowerShell...
    So it's really something with your module.
    Tried the beta one but it happens the same.

  15. lzybkr commented on Feb 16, 2018

    @lzybkr
    Contributor

    I definitely fixed a bunch of keyboard specific issues in 2.0.0-beta1 and thought I fixed this too.

    If you are confirming that the default key binding for GotoBrace does not work on Windows 10 with Português QUERTY with 2.0.0-beta, go ahead and reopen and I'll take another look.

  16. lzybkr commented on Feb 16, 2018

    @lzybkr
    Contributor

    Ugh, I think I fixed those issues post beta1 in e68ab02. If you want to try the latest build out of appveyor (link on main page of the repo), you can check that build.

  17. myWillison commented on Oct 8, 2020

    @myWillison

    I've met the same problem I'm afraid. Ctrl + ] and Alt + ? not working.
    Windows Terminal version: 1.3.2651.0
    PSReadLine version: 2.1.0 (in C:\Users\AA\Documents\WindowsPowerShell\Modules) and 2.0.0 (in C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules)
    PS version: 5.1.19041.1

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions