Coder Social home page Coder Social logo

Comments (17)

MagicPro1994 avatar MagicPro1994 commented on August 23, 2024 1

After checking, I found that Unikey used Backspace. There was a conflict between your extension and Unikey.
I'm trying to fix my own problem. If I could solve them, I will give you a pull as a patch for those who use Unikey.

from vscode-markdown.

yzhang-gh avatar yzhang-gh commented on August 23, 2024

That's really strange.

I don't know Unikey but I guess it automatically replaces Mo65t with Một when you are typing. Since Mo65t was replaced to Mot in your case, I think Unikey did do its operation but there is something wrong.

As for the extension, it will listen to Enter, Tab and Escape keys and will do some different operations when you are editing Markdown list. Are you using this keys?

from vscode-markdown.

MagicPro1994 avatar MagicPro1994 commented on August 23, 2024

Thanks for you information.
I will check it on my Laptop then feedback to you.

from vscode-markdown.

MagicPro1994 avatar MagicPro1994 commented on August 23, 2024

@neilsustc
I solved my problem but it didn't work at all cases.
If I typed "Mo65t", it works well. But when I typed "Mot65", it doesn't work.

By the way, do you know how to extend Default Key Handler?
For example:
if (something) {
doCustomFunction();
} else {
callDefaultHandler();
}

from vscode-markdown.

yzhang-gh avatar yzhang-gh commented on August 23, 2024

If you are talking about vscode key handler, it can be override by add new keyboard shortcuts which execute your code.

if (your condition) {
    // your code here
} else {
    // default behavior
}

from vscode-markdown.

yzhang-gh avatar yzhang-gh commented on August 23, 2024

Here is where I override the default backspace key.

It will execute these code.

from vscode-markdown.

MagicPro1994 avatar MagicPro1994 commented on August 23, 2024

@neilsustc : No, I want to ask to use the default handler.
If you disable all extension, when you press backspace, the default handler will be executed.
Command "deleteLeft" is just a case of the default handler. That's the reason why I can use Unikey by disabling your extension.

from vscode-markdown.

yzhang-gh avatar yzhang-gh commented on August 23, 2024

Okay, that is the problem.

But according to vscode doc, I think deleteLeft should be the default handler. Maybe we should report this to vscode?

from vscode-markdown.

yzhang-gh avatar yzhang-gh commented on August 23, 2024

The only one "backspace" in the default keybindings

image

from vscode-markdown.

MagicPro1994 avatar MagicPro1994 commented on August 23, 2024

@neilsustc When I press "backspace", it delete 4 spaces. But when I use "deleteLeft", it just delete one space. I think we should report to VSCode. (In MacOS only, In Windows, OK).
As I know, VSCode solved the problem of Vietnamese Input a year ago.

from vscode-markdown.

yzhang-gh avatar yzhang-gh commented on August 23, 2024

Have you ever tried to change the onBackspaceKey function to only execute deleteLeft, I mean

function onBackspaceKey() {
    return commands.executeCommand('deleteLeft');
}

And then test whether the problem is still there?

from vscode-markdown.

MagicPro1994 avatar MagicPro1994 commented on August 23, 2024

Yes, there it is.
"Thien Ha Dai Su" should be replaced "Thiên Hạ Đại Sự"
image

from vscode-markdown.

MagicPro1994 avatar MagicPro1994 commented on August 23, 2024

Fixed but still has some minor bugs (typing fast).

from vscode-markdown.

yzhang-gh avatar yzhang-gh commented on August 23, 2024

I have to disable you handler, because https://github.com/neilsustc/vscode-markdown/blob/master/src/unikeyHandler.ts#L15-L16 results this

vn

from vscode-markdown.

MagicPro1994 avatar MagicPro1994 commented on August 23, 2024

@neilsustc Ok. I have another way to solve my problem. I just need change key "Backspace" to "Shift+Backspace" or "Alt+Backspace". No need to modify the code.

from vscode-markdown.

yzhang-gh avatar yzhang-gh commented on August 23, 2024

Good to hear that

from vscode-markdown.

Lemmingh avatar Lemmingh commented on August 23, 2024

This is now tracked at #200
Thank you again.

from vscode-markdown.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.