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

Does map2 support hotstringing? #6

Open
Drugoy opened this issue Nov 7, 2021 · 11 comments
Open

Does map2 support hotstringing? #6

Drugoy opened this issue Nov 7, 2021 · 11 comments

Comments

@Drugoy
Copy link

Drugoy commented Nov 7, 2021

By hotstrings I mean what AutoHotkey means, i.e. being able to type abbreviations and the script would replace it with the full form (like FBI -> Federal Bureau of Investigations).

Does map2 support that? If so - could you, please, provide an example?

@Drugoy Drugoy changed the title Does map2 support hotstringing? erroneus ticket Nov 7, 2021
@Drugoy Drugoy closed this as completed Nov 7, 2021
@Drugoy Drugoy changed the title erroneus ticket Does map2 support hotstringing? Nov 7, 2021
@Drugoy
Copy link
Author

Drugoy commented Nov 7, 2021

Sorry, just figured that the docs only describe a way to use a key/hotkey to type a string (h::"hello world";), not a string to string (hw::"hello world";), which is needed for hotstringing.

@Drugoy Drugoy reopened this Nov 7, 2021
@shiro
Copy link
Owner

shiro commented Nov 7, 2021

This is on the roadmap and will be added in a future version. Currently only single-key mappings are supported.

@Drugoy
Copy link
Author

Drugoy commented Nov 8, 2021

That's very nice to hear!
I don't honestly know if that'll be of any help to you, but... just in case you are out of good ideas about how things should work and what features/design they should have - I think it'd be very helpful to look at hot AutoHotkey does them.
I don't know if you are familiar with AutoHotkey, but that's a domain-specific language (DSL) that mainly has the same targets that your map2 seems to have.
It is very mature and is generally an awesome language, but since it works only on Windows and thus unavailable to me anymore - I have very high hopes that map2 will be able to be it's replacement under Linux.

p.s.: actually it even looks like you are familiar with it, because the resemblance of AutoHotkey code and map2 code is sometimes just uncanny.
p.p.s: I think there should be a community space around map2. What do you think? In the meantime I've registered #map2 channel on IRC network on irc.libera.chat server and suggest you to come there if you like and maybe even add link into README pointing to that channel as community space. Or maybe you'd like to choose some different network (like gitter.im / zulipchat.com / anything else)?

@shiro
Copy link
Owner

shiro commented Nov 8, 2021

Thanks for the encouraging words, I'm happy it's useful to someone.
I'm planning to add some social spaces after map2 is more mature and has a larger userbase, feel free to use the IRC channel for now, but I'm mainly using discord so I'll prob. use that and bridge it to matrix as well.

I'm currently working on a big rework which will deprecate the DSL entirely and use python for scripting since maintaining a custom language that is currently 3x slower than python on average and lacks most standard functions is not feasible.
I'll make sure to fork it into a separate repo in case people want to continue using the current language for the time being.

Feel free to open issues in case you have more suggestions, etc., however I'll prob. address most stuff in the new python-based release only.

@HarmonBlues
Copy link

Thanks for the encouraging words, I'm happy it's useful to someone. I'm planning to add some social spaces after map2 is more mature and has a larger userbase, feel free to use the IRC channel for now, but I'm mainly using discord so I'll prob. use that and bridge it to matrix as well.

I'm currently working on a big rework which will deprecate the DSL entirely and use python for scripting since maintaining a custom language that is currently 3x slower than python on average and lacks most standard functions is not feasible. I'll make sure to fork it into a separate repo in case people want to continue using the current language for the time being.

Feel free to open issues in case you have more suggestions, etc., however I'll prob. address most stuff in the new python-based release only.

Wait, there's a discord? Also what's DSL?

@shiro
Copy link
Owner

shiro commented Nov 8, 2021

Not yet, I'll make one after the python update.
DSL = domain-specific language (currently we're using the custom map2 syntax, but it'll be deprecated in favor of using python)

@Drugoy
Copy link
Author

Drugoy commented Nov 9, 2021

IMO, Discord is a so-so choice.
Maybe it's worth enabling Discussions for this repo right here on github? To enable them you just need to navigate to Settings and scroll down to the end of the Features list and enable Discussions.

As for refactoring in favor of Python - I then hope that the result will be better than AutoKey, which is written entirely in Python, but never reached a decent quality level and is currently abandoned.

@shiro
Copy link
Owner

shiro commented Nov 9, 2021

Thanks for the input, much appreciated!

The chat will be hosted on Matrix, which is decentralized and has no privacy issues. It is then mirrored over to discord for people like me who don't mind using it. I might also consider bridging it to IRC so everyone can talk to each other.

AutoKey not being great (API) and not working everywhere as Autokey is X system based made me make this project, so I'll try to keep it maintained and provide features that work and make sense. The huge difference is also that map2 is written in rust and only provides python bindings rather than being written in python itself, this keeps things fast.
I'll put out a beta release at some point so people can try it out and provide feedback if desired.

I also opened discussions, feel free to open topics there as well.

@HarmonBlues
Copy link

sounds good

@Drugoy
Copy link
Author

Drugoy commented Nov 16, 2021

@shiro
You have a big plan and I wish it plays out well and I'm looking forward to try it and provide some feedback / file bugs.
I don't want at all to sound pushy, but could you elaborate a bit on when do you plan to produce some MVP (minimum viable product) with python bindings?
I'm asking this simply because I want to start writing my "hotkey scripts" already, but at the same time I don't want to write the code that is to be obsoleted very soon.
So, could you give some assessment of the progress you've made so far?
Maybe you have a list of small targets/milestones/missing functionality, that needs to done before you could call the refactor a success and merge it into master?

@shiro
Copy link
Owner

shiro commented Nov 29, 2021

If anyone wants to try out the new python branch, there's now a preview announcement. The API will prob. change, but it might be easier to write new scripts in python rather than port them over from m2 later.

Hotstrining will continue to be tracked here, regarding other stuff please use GH discussions above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants