Code Monkey home page Code Monkey logo

mathsymbolsinput's People

Contributors

knrafto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

mathsymbolsinput's Issues

Add control key symbols to default character set.

I find myself typing out keyboard shortcuts reasonably often. Others might benefit from including the proper symbols in the default set.

Here's a list copied from Stack Exchange: https://apple.stackexchange.com/questions/55727/where-can-i-find-the-unicode-symbols-for-mac-functional-keys-command-shift-e

  • ⌘ U+2318 command
  • ⇧ U+21e7 shift
  • ⌥ U+2325 option
  • ⌃ U+2303 control
  • U+21a9 return
  • ⌤ U+2324 enter
  • ⌫ U+232b delete
  • ⌦ U+2326 forward delete
  • ⌧ U+2327 clear
  • ⇥ U+21e5 tab
  • ⇤ U+21e4 backtab
  • ␣ U+2423 space
  • ⎋ U+238b escape
  • ⇪ U+21ea caps lock
  • U+23cf eject

Tab completion

It would be nice if pressing tab completed the command instead of just inserting an incomplete command name. So, e.g., \al would complete to \alpha, inserting α, if that is the only available completion. If there are multiple completions, showing a list of completions would also be nice.

Use lower-level key events?

Examples of where this might help:

  • escape doesn't work in VSCode find bar (the find bar still goes away...)
  • cmd-z doesn't commit in Xcode (try \t cmd-z )

Reload MathSymbolsInput.plist if it changes

Hi,

I was attempting to package this input method with a declarative build setup (see LnL7/nix-darwin#587). It works well, but one problem is that if the list of custom commands is updated then the input method does not pick up the changes until the user logs out. The way this setup works is that it generates a com.mathsymbolsinput.inputmethod.MathSymbolsInput.plist file and then symlinks that into /Users/USER/Preferences/.

This is entirely a synthetic problem of my own making (and so don't expect any changes), but I was curious if it might make sense to add some ability to update the internal command buffer if the preference file changes. Potentially either through some sort of watch method (which may not work with the symlink) or by loading the preferences file each time the input method is switched to.

This may also help solve #17. You can see how I am attempting to share configurations between machines here.

Main menu

I'm not totally sure what to put here though. Suggestions:

  • Find out how to type a symbol
  • List of all symbols
  • Links to homepage or help or about

Make icon

Right now it uses Apple's sample from NumberInput

Xcode does not deactivate input method when the cursor moves via mouse click

Steps to reproduce:

  • Type "\foo" into an xcode editor. Leave the input method active.
  • Place the cursor somewhere else in the text document by clicking.
  • Press enter.

A newline should be inserted, but instead a duplicate "\foo" is inserted at the cursor.

This is probably an XCode bug; the same thing happens with Chinese Pinyin.

Menu does not work when cursor is in the Chrome address bar

If you try clicking on "About" from the menu while the keyboard focus is in the Chrome address bar, nothing happens. The menu works if the keyboard focus is in the webpage, however.

I'm fairly sure this is a macOS and/or Chrome bug. The same issue occurs with Google Japanese Input's menu. Chrome's address bar is probably highly customized and implements its own input method functionality, and nobody tested the menu.

Typed command is not underlined in XCode

There's no indication if the input method is active or not, because the "marked text" is not underlined. This is probably an XCode bug, because the same thing happens with Chinese Pinyin.

VS Code "find" dropdown disappears when pressing escape

Steps to reproduce:

  • Open the VS Code find bar with command-F
  • Type \foo, leaving the input method active
  • Press escape

The text \foo should be inserted into the find bar, and the find bar should be left open. Instead, the find bar closes too.

Dead keys in keyboard layout generally don't work

Dead keys in the US keyboard, and a few other keyboard layouts I tested, don't work with the input method active. Frustratingly, dead keys do seem to work with the "ABC - Extended" layout, and custom layouts made with Ukelele.

Currently we use the "key binding" approach to receive input data from InputMethodKit. Let's say we press Option+e then o to input ó. With the ABC - Extended layout, we get the following events:

With the US layout, we get:

  • inputText="´", lastKeyEventWasDeadKey=true
  • inputText="o", lastKeyEventWasDeadKey=false

Some options on how to fix this:

  1. Convince Apple to somehow change how input data is sent or interpreted so that all keyboard layouts behave like ABC - Extended. I don't have much hope of this happening.
  2. Use the lower-level "handle all events" approach of receiving data from InputMethodKit, using UCKeyTranslate to handle dead keys ourselves. This could allow us to have a nicer UX by showing an underlined accent when a dead key is pressed instead of having no feedback. However, we'd also have to implement key bindings ourselves, which seems tricky to get right.
  3. Guess what the resulting character should be if we detect a dead key with the "key binding" approach. This would probably work for the most "common" keyboard layouts but probably not for all of them, which could be surprising to the user (for example, the ABC - Extended layout maps "№" + "q" to "ƣ", and I'm not sure how we're supposed to guess that).

Import/export custom commands via text file

For instance, in order to share between multiple computers.

For now, you can copy ~/Library/Preferences/com.mathsymbolsinput.inputmethod.MathSymbolsInput.plist in its entirety from one computer to the next, but this will delete any previous custom commands on the target computer. And it only works on Mac.

Do not disable standard press-and-hold accent popup

Would it be possible for the extension to not disable the press-and-hold accent popup? If that's not possible, it would be good to include latex sequences for accented characters in the standard command set.

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.