joelekstrom / fastmate

A native Fastmail-wrapper for Mac.
MIT License
194 stars 12 forks source link

Insert keystrokes instead of manipulating CSS elements? #3

Closed pro-sumer closed 6 years ago

pro-sumer commented 6 years ago

Thank you for fixing ⌘N and ⌘F! However, they only work in the FastMail production environment; not in the beta environment. Reason is that the CSS identifiers are different (and being modified now and then) in the beta environment.

Would it technically be possible to generate keystrokes in Objective-C (c for ⌘N and / for ⌘F) instead of acting on elements in JavaScript?

Keystrokes are much less likely to change and would thus be a more stable solution.

For now I'm using Keyboard Maestro to perform this key mapping and that works fine. However, it would be even nicer if Fastmate could do this natively (without another App like KM).

joelekstrom commented 6 years ago

Hey, that's a great idea. I'm not too happy with how I activate these elements currently. I'll check it out!

joelekstrom commented 6 years ago

This seems to work great, thanks for the tip!

joelekstrom commented 6 years ago

Generating keystrokes in objc required accessibility access, so I generate them in JS instead. Still a much better solution. Please let me know if there are any other keyboard shortcuts you'd like native bindings for.

pro-sumer commented 6 years ago

You could map "Edit | Select All ⌘A" to * + A, but personally I don't use this combo that much.

Of all the FastMail keyboard shortcuts ⌘N and ⌘F will probably be the ones I use most...

Thanks again!