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

Symbol shortcuts no longer work #14

Open
qy9git opened this issue Dec 2, 2022 · 12 comments
Open

Symbol shortcuts no longer work #14

qy9git opened this issue Dec 2, 2022 · 12 comments
Assignees
Labels
bug Something isn't working

Comments

@qy9git
Copy link

qy9git commented Dec 2, 2022

The extention doesn't work.

Context: A year I was using an other extention called "Desmos More Greek Letters" but it suddenly stoped working. I downloaded the source and figured out a fix. Well now it's broke again idk how to fix it.

So I searched another extension that can do the same thing! But unfortunatly it's not working here either :(
Here's the video that explains the issue more clearly:
https://user-images.githubusercontent.com/51716593/205407145-3fb87594-636d-44df-bc14-cf378bb8d7a9.mp4

@SinclaM
Copy link
Owner

SinclaM commented Dec 3, 2022

You're right--it's totally broken right now. I'm not sure what changed on Desmos' end, but this is definitely a must-fix. I'm really busy this week, but I'll try to get it working again as soon as I have the time.

@SinclaM SinclaM added the bug Something isn't working label Dec 3, 2022
@qy9git
Copy link
Author

qy9git commented Dec 8, 2022

I hope u fix it 🥺

@SinclaM SinclaM self-assigned this Dec 27, 2022
@SinclaM
Copy link
Owner

SinclaM commented Dec 27, 2022

I think I've found the source of the issue.

The autoCommands option (which controlls symbol shortcuts) in the object passed to the Desmos.MathQuill.config function is now being ignored. This really sucks since it's basically the foundation of this extension and also pretty frustrating since it's supposed to be part of MathQuill's public API.

I don't know if this was specifically meant to stop users from using custom symbols (which they have always discouraged) through extensions like this or just a side-effect of some other big changes they've been making. If the latter is true, it might be possible that there's another way to cleanly update the autoCommands, but I'm not terribly optimistic. It's more likely that a fix would require more preload overrides which is likely doable but would probably not be very stable and would require a lot of time to figure out.

I don't have as much time to work on this extension as I did when I made it, so sadly I don't think a fix is coming for this anytime soon.

At least the other options are still working (breakout characters, auto-parenthesized functions, shortcuts in subscripts).

@SinclaM SinclaM pinned this issue Dec 27, 2022
@SinclaM SinclaM changed the title The extention doesn't work. Symbol shortcuts no longer work Dec 27, 2022
@SinclaM
Copy link
Owner

SinclaM commented Dec 27, 2022

As a side note, this would be a great opportunity for DesModder to take over custom shortcuts (which seems to be on the docket anyway).

@qy9git
Copy link
Author

qy9git commented Dec 30, 2022

Well your extention was great because it had other symbols like ± that was very handy.

@GanerCodes
Copy link

does anyone have like, maybe an offline version of desmos where this extension (and desmodder) are working? Like almost all my college notes are now corrupted because I use a lot of desmos unlocked math symbols

@GanerCodes
Copy link

does anyone have like, maybe an offline version of desmos where this extension (and desmodder) are working? Like almost all my college notes are now corrupted because I use a lot of desmos unlocked math symbols

bumping this it's seriously annoying

@Reeperto
Copy link

Reeperto commented Jun 27, 2023

I've experimented and seem to have found a way to enable autocommands again. The following code snippet when ran seems to allow the user to input Gamma and have it properly turn into Γ.

function ApplyAutocommands() {
  const fields = document.querySelectorAll('.dcg-mq-editable-field')
  fields.forEach(field => {
    const opt = field._mqMathFieldInstance.__controller.root.cursor.options;
    opt.autoCommands.Gamma = 1;
    
    // The following also works. Anything that coerces to true enables it and vice versa for disabling
    // opt.autoCommands.Gamma = true;
  })
}

One important thing to note is that this only will apply to all the current mathquill boxes and any new expression wont have the autoCommand. A potential solution is to just repeatedly call the function on a timer to apply this to all the expression inputs. Maybe slightly hacky but it works. Alternatively one could just call this every time enter, up, or down are pressed, applying the new config to the maybe new entry box. Hopefully this insight could help re-enable symbol shortcuts.

@qy9git
Copy link
Author

qy9git commented Jul 1, 2023

Wait a second, you're saying it can rework 👀

@faisalnjs
Copy link

We need this!!

@Pencilfish1
Copy link

Has there been any progress on this?

@SinclaM
Copy link
Owner

SinclaM commented Oct 3, 2024

I haven't been maintaining this project for quite some time. My hope was that DesModder would have had equivalent features by now, but it sounds like that's not the case. Although I don't have the time for it myself, if someone is interested in maintaining this project, please feel free to fork it and to reach out to me if you need help (but it's been a while since I developed this--not sure how useful I'd be).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants