7 ms·
An accentuated Emacs experiment (à la macOS)
- db48x 4y agoI should be possible to use the OS’s IME, whatever that may be. If not, type `M-x report-emacs-bug` to send a bug report.
- User23 4y agoVery cool! One fix for the magit navigation issue could be somehow checking that the key you’re chording would otherwise call self-insert-command in the current mode.
- bradrn 4y agoFor a ~50-year-old program, Emacs’s support for multilingual input — and really, it’s all-round flexibility — continually amazes me! For myself I prefer my own custom keyboard layout [0], because it works outside Emacs too, but I’d happily use Emacs’s own input methods if that would be sufficient. (In fairness, I have found one weak spot, namely font support… I’ve used ‘unicode-fonts’ [1] with some success, but reportedly it doesn’t work with the latest Emacs. Ah well, it’s at least fairly rare that this becomes a problem in practice.) [0] https://github.com/bradrn/Conkey https://github.com/bradrn/Conkey [1] https://github.com/rolandwalker/unicode-fonts https://github.com/rolandwalker/unicode-fonts
- projektfu 4y agoI remember the transition. They did handle it remarkably well, in the time of many different charsets.
- klodolph 4y agoEmacs is a bit crazy about it... it has its own set of input modes which include modes you may not be familiar with. You can use various IMEs that plug directly into Emacs rather than relying on a systemwide IME (which was neat back when systemwide IMEs didn't work well), and there are systems like RFC 1345 (type &e' for é, &e* for ε, &12 for ½, etc), or TeX (type \'e for é, \varepsilon for ε, \frac12 for ½, etc). So many people have their own preferences for how to type these characters, write an input method for Emacs, and get it included.
- cassianoleal 4y agoAs a Portuguese speaker, I have a terrible dislike for this on macOS. It's usually one of the first things I disable. It's slow to activate, and slow to select, so it's disruptive to my thinking and expressing. Dead keys, on the other hand, allow me to type fluidly. I switch between a keymap with and one without dead keys with a single shortcut depending on whether I'm typing English/programming, or Portuguese/other accented languages.
- deleted 4y ago[deleted]
- misnome 4y ago> As a Portuguese speaker, I have a terrible dislike for this on macOS. It's usually one of the first things I disable. It's slow to activate, and slow to select, so it's disruptive to my thinking and expressing. Dead keys, on the other hand, allow me to type fluidly. Isn't the entire point of this popup to give you a visual fallback option if you e.g. aren't a native speaker and don't know how to type it otherwise? For instance, assuming an english keyboard layout, typing á is a matter of "Alt-e a". I don't think it's meant to be the primary input method for native speakers?
- cassianoleal 4y ago> I don't think it's meant to be the primary input method for native speakers? I'm assuming you meant that as an affirmation despite the use of the question mark. If that's the case, then I agree it makes sense! I find macOS's default to have this enabled pretty bad though. I understand it on iDevices where dead keys would be awkward but not on a computer with a full, physical keyboard.
- klodolph 4y agoThe question mark in this case doesn't indicate that the sentence is a question. This usage is common but not permitted in formal writing.
- projektfu 4y agoI've always wondered why accents are generally added before the letter in most systems. The old Mac way was option-e e for é, dead-key way is ' e, but you have to type ' ' or ' SPC for the actual quote character. There's some keyboards based on alt-gr and such, but when we write we usually do it afterwards. I could see that sending the wrong character initially to an online program is suboptimal, but we often do that anyway and have to hit delete. Another thought, why is there no clever autocorrect to try to add the ¿ in the right spot? Again, not the desired behavior always, but in many cases. It could be a suggestion that you must approve. Thankfully, texting has shown that Spanish users are not that keen on correct punctuation.
- masklinn 4y ago> The old Mac way was option-e e for é It's still the mac way. The long press thing is only usable if you just need accents once in a while, and can be disabled.
- bradrn 4y ago> I've always wondered why accents are generally added before the letter in most systems. As with many of these things, it’s a holdover from typewriters. ‘Dead keys’ in typewriters were literally keys which did not move the carriage to the next position: thus to get accented characters you would type the dead key, then the letter, so that both would end up in the same position on the page. (Incidentally, this also explains why we so often use SPC after a dead key to get the base character.)
- theCodeStig 4y agoThis is great! Have you considered to make this into a package?
- peoplefromibiza 4y agoMacOS way it's only half good if you don't use accents while typing and only need them that one time, while in all languages with accented letters it's the worst and slowest method you can use.
- globuous 4y agoTrue that. But I typed French on a qwerty for a while on Mac OS, and you « just » alt+e-e to do é or something. You get used to it. And on iPhones, I never actually hold « e » to show the accents, their system figures out the accents. Although it missed sometimes, it’s pretty good. I can just type « je suis arrivee a la maison » and it accentuâtes my letters properly. Actually, I had to manually remove the accents for this exemple ^^ Édit: ok, that’s kinda funny, it must be because I typed French in English and it messed it up, but « accentuâtes » doesn’t make any sense, same with « édit » it just inferred for my. Leaving the message as is for the lols
- peoplefromibiza 4y agoThat's what I used too on Mac and it also works on Linux AltGr+e for grave accent and AltGr+' for acute accent. Much better than auto completion boxes My language, as yours, contains a lot of accented letters and it would be absolutely impractical to chose them from a dropdown. p.s. I type on an Italian keyboard with UK layout because it's more comfortable for typing code
- makapuf 4y agoI understand you so much. Typing code on a non US keyboard (French here) is much worse. I long for a French coder layout.
- larusso 4y agoI’m typing German on a US keyboard layout and I’m very used to the alt +u-u chord etc to write the Inlauts. I still don’t have a setup on Linux though because I’m used to type this sequence with the left Alt key not the right.
- muro 4y agoI like the macos input a lot, by some accents are missing. I filed feedback, but that's a black hole. Is there a a way to replace the characters it uses?
- elias94 4y agoHey, here is the author of the accent package. It was my first extension that wrote after 1 week on starting using Emacs. ELisp is really great! MacOS menu for accented characters is must have for me and I cannot understand why other OS are not adopting it. Thanks for the article, it's a nice trick
- codedokode 4y ago> macOS has a wonderful input mechanism where you press and hold a key on your keyboard to display the accent menu. Is it really convenient? I don't like to wait and would rather prefer to press a sequence of "Compose", "a", "1", (or, which is faster, "a" and "1" simultaneously). And make a popup appear when "Compose" + "a" is pressed. Linux has Compose key, but it is implemented poorly, it doesn't provide an UI for selecting character and discovery of combinations, and in Gnome it has very small choice of characters. Another alternative would be to insert accented characters automatically.
- deleted 4y ago[deleted]
- tgv 4y agomacOS offers three ways to input. One by holding the key (which it inherited from iOS), one through changing the keyboard to another locale, and one by language independent prefixes: alt-u for umlaut/dieresis, alt-e for accent aigu, etc.
- JadeNB 4y agoUnfortunately, neither the first nor the last way is customiseable (and I consider changing the locale pretty brute-force …), or at least not according to the Mac experts I asked when I did a deep dive (which, to be fair, was long ago, before iOS even existed). You can always use the Unicode picker, but, if you never use, say, Opt-Z for Ω and want to re-bind it to something else, or if you wish the 'o' long-press menu included ő … too bad! (I admit I am engaging in the rhetorical tactic of confidently asserting that something is impossible in the hopes that someone will be lured to come along and correct me, so that I can be happily wrong.)
- tgv 4y agoThere used to be a way to define your own keyboard decoding, but I don't know if you still can, nor how flexible it is. I'm guessing it won't be Turing complete.
- twawaaay 4y agoCompletely unacceptable as an input method for anybody with any level of typing proficiency. I can type couple words during the time it would take to input one character... Also, while typing 10 characters per second visual elements stop working. When I make a mistake and visual signal has to reach my brain and be recognised I have typically already typed half a dozen characters.
- BlueTemplar 4y agoSounds more like a job for the keyboard layout itself ? https://norme-azerty.fr/en/ https://norme-azerty.fr/en/ (With good support for all(?) the Latin-based languages, and also Greek... I kind of wish they had managed to fit Cyrillic on another mode too !) P.S.: better than the old AZERTY for math & code too !
- cardanome 4y agoAs one of the few people actually using the Colemak keyboard layout, I am very glad about it's excellent multi-language support. It allows me to type nearly any language reasonably well. https://colemak.com/Multilingual https://colemak.com/Multilingual (Basically any latin-chars using language, Chinese and Japanese are also fine as they use IME-based inputs, only Cyrillic based langs and APL are a bit of problem but can't have everything) For the languages I use is it is mostly a matter of AltGr + key, which is quite ergonomic. It would suffer greatly if I had to make long presses as that would kill my typing speed. Not to distract from how awesome Emacs is though. Just wanted to add a solution for those who regularly type text in different languages.
- herodotus 4y agoWow: all my years using MacOS, and I did not know this: > macOS has a wonderful input mechanism where you press and hold a key on your keyboard to display the accent menu. The depth of my ignorance may be unbounded.... Anyhow, thanks! I'll use it!