GithubHelp home page GithubHelp logo

Key Bindings about stino HOT 17 CLOSED

robot-will avatar robot-will commented on June 29, 2024
Key Bindings

from stino.

Comments (17)

keystoneclimber avatar keystoneclimber commented on June 29, 2024 2

For anyone having trouble with the key bindings mentioned above not firing the upload command (upload_binary), the command in the latest version of Stino has been changed to upload_sketch.

from stino.

xiujunma avatar xiujunma commented on June 29, 2024

I agree, but default key binding may conflict with other plugin.
This my key binding:

[
  { "keys": ["super+f1"], "command": "show_arduino_menu" },
  { "keys": ["super+alt+n"], "command": "new_sketch" },
  { "keys": ["super+alt+l"], "command": "compile_sketch" },
  { "keys": ["super+alt+u"], "command": "upload_binary" },
  { "keys": ["super+alt+m"], "command": "start_serial_monitor" },
  { "keys": ["super+alt+k"], "command": "stop_serial_monitor" },
  { "keys": ["super+alt+x"], "command": "send_to_serial" }
]

from stino.

Robot-Will avatar Robot-Will commented on June 29, 2024

I am working on the next version. The next version will add support of ST3. But it is not easy because ST3 uses python 3.3. I will consider to add key bindings for next version.

from stino.

fatdollar avatar fatdollar commented on June 29, 2024

Sounds good. I made my own key bindings as well.
@Robot-Will Awesome job btw it works flawlessly I think you did very well with this plugin.

from stino.

tlalexander avatar tlalexander commented on June 29, 2024

For users who are new to sublime text (like I am as of today), here's how you would add the above keybindings to sublime text 2.
Just select:
Preferences - > Key Bindings - User
and a tab will open with the preferences. Paste xiujunma's keymap from above there, save it (then close I suppose) and mine were immediately active.

Since I come from windows (eclipse/visual studio) and the mac keyboard I have has no auxiliary purpose for F5 and F6, I added these lines to xiujunma's above to make F5 compile and F6 compile and upload:

 { "keys": ["f5"], "command": "compile_sketch" },
 { "keys": ["f6"], "command": "upload_binary" },

just add those inside of the square brackets, making sure every line but the last line ends with a comma.

@Robot-Will can we have something like this that at least could be enabled (keep it off if needed by default to avoid conflicts)? As a new user just getting set up was enough of a pain, and I didn't immediately know how to get some key bindings. I'm lucky I found this thread!

from stino.

simonbarker avatar simonbarker commented on June 29, 2024

Just to clarify for any mac user's - the super key is CMD

from stino.

ulph avatar ulph commented on June 29, 2024

cross posting; #57 (comment)

from stino.

DCEM avatar DCEM commented on June 29, 2024

Hi, great plugin!

On my German keyboard (using Windows) there is a "Alt Gr" Key, which basically does the same as pressing alt + crtl
["alt+ctrl+e"] produces €
["alt+ctrl+m"] produces µ
["alt+ctrl+2"] produces ²
["alt+ctrl+3"] produces ³
["alt+ctrl+0"] produces }
["alt+ctrl+9"] produces ]
["alt+ctrl+8"] produces [

The default keybindings of Stino result in me beeing unable to type €, µ, ², ³, }, ] or [.
So for the moment I got rid of these bindings which is working out ok for me…

Is it possible to switch these bindings off when switching the language to german?

Thank you!

from stino.

Robot-Will avatar Robot-Will commented on June 29, 2024

I think you can revise the key binding file (Default (Windows).sublime-keymap) by yourself.

from stino.

Kaboofa avatar Kaboofa commented on June 29, 2024

Hello,

this Default (Windows).sublime-keymap on french keyboard prevents caracters like '#' or '' to work correctly (it's really annoying). The documentation's piece of advice is to not use Ctrl+Alt+ for any Windows key bindings http://docs.sublimetext.info/en/latest/reference/key_bindings.html#warning-about-bindable-keys.

Best Regards,

KaB

from stino.

HectorBravo avatar HectorBravo commented on June 29, 2024

It's possible to use those characters on German, French or any other keyboard. I have them for my Spanish keyboard. Just click on Preferences / Key Bindings - User, and for your German keyboard paste the following and save the file:

[
{ "keys": ["ctrl+alt+e"], "command": "insert", "args": {"characters": "€"} },
{ "keys": ["ctrl+alt+m"], "command": "insert", "args": {"characters": "µ"} },
{ "keys": ["ctrl+alt+2"], "command": "insert", "args": {"characters": "²"} },
{ "keys": ["ctrl+alt+3"], "command": "insert", "args": {"characters": "³"} },
{ "keys": ["ctrl+alt+0"], "command": "insert", "args": {"characters": "}"} },
{ "keys": ["ctrl+alt+9"], "command": "insert", "args": {"characters": "]"} },
{ "keys": ["ctrl+alt+8"], "command": "insert", "args": {"characters": "["} }
]

For my Spanish Keyboard, I have:

[
{ "keys": ["ctrl+alt+1"], "command": "insert", "args": {"characters": "|"} },
{ "keys": ["ctrl+alt+2"], "command": "insert", "args": {"characters": "@"} },
{ "keys": ["ctrl+alt+3"], "command": "insert", "args": {"characters": "#"} },
{ "keys": ["ctrl+alt+e"], "command": "insert", "args": {"characters": "€"} },
{ "keys": ["ctrl+alt+m"], "command": "insert", "args": {"characters": "µ"} }
]

from stino.

DCEM avatar DCEM commented on June 29, 2024

As Kaboofa already stated the documantation says:
Ctrl+Alt+ should not be used for any Windows key bindings. [...] the user’s ability to insert non-ASCII characters would be compromised.

Witch is exactly what happens.

Of cause you can change this manualy as you described. I still think it would be nice to make the key-bindings language-dependent

This way it would simply work out of the box.

Unfortenately I don't know how to implement this, if somone maybe has a hint that would get me started i would be glad to try.

Greetings

from stino.

Robot-Will avatar Robot-Will commented on June 29, 2024

I am sorry for I am busy and have no time to improve this plugin frequently.

As I do not know what's the best hotkey solution for everyone, I did not take any advise of this topic.

If you are not satisfied with the current key settings, you can revise the key setting files manually.
Default (Linux).sublime-keymap
Default (OSX).sublime-keymap
Default (Windows).sublime-keymap

from stino.

bheklilr avatar bheklilr commented on June 29, 2024

@Robot-Will As per the Unofficial Sublime Text API documentation, the mappings CTRL+ALT+<alphanum> should be avoided on Windows and OPTION+<alphanum> should be avoided on OS X. I would simply follow this rule and pick some key bindings that use the function keys by default. Those are bound to less frequently, and everyone's just going to remap them to what they want anyway. As of the last update I got on Windows, CTRL+ALT+P was bound to "Upload with Programmer", but it conflicts with the widely used workspace quick switch command. If I change it to something else in the default file, it just gets overwritten on the next update. Please consider picking new bindings that might be more inconvenient to press, but less likely to conflict with built-in bindings.

from stino.

darbula avatar darbula commented on June 29, 2024

@Robot-Will unfortunately none of the proposed solution is appropriate:

  • manually revision of keymap files would be fine only until the package is upgraded.
  • Overriding those problematic key bindings in user keymap is not working when some of the inserted characters, like { should trigger some command by themselves like \cite{ in LaTeX
  • unbinding in user keymap is not possible.

Here's my vote to change them in this package keymap. The goal is not to guess everyone's best hotkey solution, just to follow a good advice stated in SublimeText documentation.

from stino.

VikIborra avatar VikIborra commented on June 29, 2024

Thanks Hector bravo for...
[
{ "keys": ["ctrl+alt+1"], "command": "insert", "args": {"characters": "|"} },
{ "keys": ["ctrl+alt+2"], "command": "insert", "args": {"characters": "@"} },
{ "keys": ["ctrl+alt+3"], "command": "insert", "args": {"characters": "#"} },
{ "keys": ["ctrl+alt+e"], "command": "insert", "args": {"characters": "€"} },
{ "keys": ["ctrl+alt+m"], "command": "insert", "args": {"characters": "µ"} }
]

from stino.

rkinnett avatar rkinnett commented on June 29, 2024

For anyone having trouble with the key bindings mentioned above not firing the upload command (upload_binary), the command in the latest version of Stino has been changed to upload_sketch.

Thanks @keystoneclimber

Update: the upload command is now stino_upload

from stino.

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.