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

Variables as keys #812

Open
WubTheGame opened this issue Dec 4, 2024 · 7 comments
Open

Variables as keys #812

WubTheGame opened this issue Dec 4, 2024 · 7 comments

Comments

@WubTheGame
Copy link

For my particular case, I'd like a "key" that inputs the current time (and optionally the date). I recognize this is variable thing, and it could be cool to have a more flexible system than just for this one thing, so I'll leave that as a suggestion for later down the road, hoping this one function would be quicker and easier.

Also, it'd be nice to be able to configure keys to input text directly to the clipboard (whether text is selected or not) to trigger MacroDroid macros. It has a Clipboard Change trigger.

Thank you for this keyboard in advance and regardless.

@Julow
Copy link
Owner

Julow commented Dec 4, 2024

The date/time has been suggested before: #228
It's unclear what a more flexible system could look like or what it would offer. Thought, I'm not against a key that would output the current date and/or time, perhaps taking the silly date/time patterns from Java or having two keys for date and date with time.

Could you implement it ?

I'm also not against the specific text to clipboard idea. The "complex" key syntax would allow to describe this kind of keys in layouts: https://github.com/Julow/Unexpected-Keyboard/blob/master/doc/Possible-key-values.md#complex-keys

@WubTheGame
Copy link
Author

I meant a more flexible system as in multiple variables and all that that you can manage. Though perhaps what I'm thinking of is more like a mini-scripting system (I am at least a fair bit of a power user). What I picture is creation of fixed keywords you type to trigger fixed or variable text or operations. Like typing a short string as an alias to output a longer one.

Anyway, I'd love to try implementing it, but my programming expertise only goes as far as AutoHotkey. I'm certainly no android developer (though I understand from elsewhere in these threads that things can be tested on PC). If you could point me in the right directions for figuring out how I might be able to (files in the repo to edit, general idea of what to go for code-wise), I'd be open.

@Julow
Copy link
Owner

Julow commented Dec 7, 2024

Do you have a list of the variables you are mentioning. I think this is a little vague and that's why I'd suggest starting small with the date and time keys so it starts to solve problems.
A scripting language within the keyboard is out of the question without compelling use cases. This app is meant to remain light.

@WubTheGame
Copy link
Author

Fair enough. Don't mind me going on about the variable system, I can get way ahead of myself with these things. By this I mean I have general ideas as in a number of "aliases" you can program different outputs for, but besides current time/date I don't know what in particular would be useful and non-fixed. Like having an alias system, and you can set an alias to output a variable and/or fixed value/sequence of characters. Just something to consider eventually.

....And before sending, I realize the only thing really new about this suggestion is the variables part since you can already set custom keys that output whatever and however many characters you want. So, take this with what you will then.

@Spike-from-NH
Copy link
Contributor

The notion of date and time reminds me of an old scripting language in which matching accent-grave characters meant, "Submit the enclosed string to the shell and replace the entire expression with the shell's output." Ah, but next you'll want functions to edit the string…

@ChiefMikeK
Copy link

💡 I remember using in the past a keyboard that would like do stuff such as print out comment syntax <-- --> and place the cursor back in between.

@Spike-from-NH
Copy link
Contributor

@ChiefMikeK, this is an easier request than date/time. The emerging complex syntax in custom layouts, when completed, ought to let you map a key to the comment characters followed by a suitable number of left-arrow strokes.

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

4 participants