6 ms·
Show HN: Devil Mode: A twisted Emacs key translator for modifier-free editing
- geokon 4y agoThis looks fantastic :))
- hibbelig 4y agoI wonder how well this would work with SPC as the devil key.
- kleiba 4y agoNot at all.
- bradrn 4y agoReminds me of god-mode: https://github.com/emacsorphanage/god-mode https://github.com/emacsorphanage/god-mode. Although I use Evil, it still comes in handy on occasion when I need to type something without an Evil keybind. Alas, it’s been abandoned, though it still seems to work for me on the rare occasions I need it.
- juujian 4y agoInteresting concept. The constant modifiers in Emacs are really such a turn-off. I want to give Emacs another try, but I cannot understand why functionalities are accessed like this in the first place. In sublime text, with ctrl+shift+p I can access most of the functionalities I need. Still a weird key combination, but sure beat ctrl+x ctrl+f... Edit: I am still not sure why it isn't just something more direct like ctrl+j, since it is used so much, maybe someone can enlighten me...
- bitwize 4y agoST's command palette is a descendant of M-x in emacs.
- schemescape 4y agoTangent: any tips on how to make the M-x line more usable, similar to a command palette? I just got started with Emacs, and the archaic terminology and inconsistent naming is causing me to have to consult StackOverflow for basic things like “what are the copy and paste commands called?”. (Those were probably both in the tutorial, but I already forgot them a few times.) I’m aware of “apropos”, but it also uses antiquated terminology, so it’s frequently not useful to me. I’m sure this problem has been solved :)
- Conscat 4y agoYou probably want posframe along with one of the many options for a vertical completion candidate minibuffer (I like vertico), and a package like marginalia to annotate the options like VS Code. A non-default completion-style like hotfuzz, flx, or orderless might also interest you.
- bitwize 4y agoI use ivy-mode. Apparently it's not the cool thing anymore, but I use it because it's simple and it works. With ivy-mode enabled, anything Emacs asks you that has a list of options -- so, M-x, file selection, buffer selection, etc. -- will pop up a little menu right in your minibuffer. It should be available in ELPA, with a more recent release in MELPA.
- _a_a_a_ 4y ago> I’m aware of “apropos”, but it also uses antiquated terminology can you clarify 'antiquated' for me please
- schemescape 4y agoHere’s an example: M-x, “apropos”, RET, “copy text” No apropos matches for “copy text” Using just “copy” returns two undocumented variables first. I did eventually find kill-ring-save, but it took more digging than I’d like. Obviously if I embraced (or at least remembered) Emacs’s terminology I’d have a better experience, but I’m not there yet. Edit again: “copy selection” found copy-region-as-kill, which is maybe what I should have searched for originally. Not sure yet how it differs from kill-ring-save.
- gumby 4y agoThis is an heir to a long history: many keyboards did not have a meta key (in fact had only a seven bit connection to the host) so you could type escape as a way of saying “treat the next keystroke as having its meta bit set”. And escape itself was just a fallback for altmode if all you had was an ascii terminal. On a standard MIT-AI TV keyboard (Knight keyboard) you could type M-Altmode to get a minibuffer and just type some TECO for immediate execution — if you wanted to cancel you you’ll press escape, which was the original semantics of “escape” anyway. Compressing that to a standard ASCII character set probably made emacs a little more obscure for people who didn’t have a mental model of using it on a more capable keyboard.
- susam 4y agoIndeed. A really easy way to test this out on a modern Unix-ish system is to launch a terminal emulator, run cat, and then type Alt+a followed by Esc a. And then for bonus, type Ctrl+[ a. The output should look like this: $ cat ^[a^[a^[a
- msla 4y agoInterestingly, on my Linux setup, Alt-a gets me this for left and right Alt: á Ubuntu 22.04 I set up PrtSc as a compose key and have an .XCompose file, but that still works.
- msla 4y agoThrough a little playing around, I figured it out: My Alt actually is a Meta key, in that it sets the high bit. Convert the resulting eight-bit value to UTF-8 and you get the observed behavior: 'a' is 0x61 (0b01100001) and 'á' is U+00E1 (0b11100001) in Unicode.
- zevv 4y agoWell, someone has to say it, right? "You might as well use vi."
- msla 4y agovi doesn't have a good extension language. (Actual vi doesn't have any extension language, but even Vim lags seriously in this realm.)
- Syzygies 4y agoThis could be done more cleanly in keyboard firmware. I recovered from a deep dive into mechanical keyboards by trying Topre switches, the obsession killer. I now have four Leopold FC660C keyboards with Hasu FC660C controllers, with custom QMK firmware. After many experiments, I've been won over by making every key near home row a "tap / hold" key. Tap for usual keystroke, hold as a modifier to access a custom keyboard layer with the other hand. This is an empirical question. I've learned chording keyboards. I had the original FingerWorks TouchStream multitouch keyboard, tech which Apple turned into the iPhone. I've owned various ergonomic and small keyboards. I've tried many versions of my own firmware. I learned Dvorak on a one-handed half keyboard, and experienced the miracle of knowing how to type Dvorak both hands with no practice. Brain plasticity is very important to me; I've tried everything I can. "One finger each hand, near home row" is stripped down chording that wins hands down over any other typing system I've ever tried. Taking advantage of the quadratic address space (versus a linear multiple using a fixed set of modifier keys), I control every aspect of my computer this way. "Control-Xylophone" has kept me from ever accepting Emacs. I should write a two finger chording interface to Emacs, in the spirit of Devil Mode. Leopold FC660C Mechanical Keyboard https://mechanicalkeyboards.com/shop/index.php?l=product_detail&p=4096 https://mechanicalkeyboards.com/shop/index.php?l=product_det... Hasu FC660C Controller https://1upkeyboards.com/shop/controllers/fc660c-controller/ https://1upkeyboards.com/shop/controllers/fc660c-controller/
- yes_but_no 4y agoDo you mind sharing your qmk config? I'm using homerow for modifiers and combos for symbols, barely using any layers. Though idea of ditching homerow modifiers for layers not crazy since there is no arbitrary modifier need (cmd-c t etc can be thrown into a layer)
- pk2200 4y agoNice! Years ago I added home row chording to a simple text editor I was writing. It worked so well that I wondered why it's not common practice. You should write more about your project! :)
- all2 4y agoI will echo another commenter, I'd love to hear more about how you arrived at this, and what your current practice looks like (the theory of operation, if you will). I'd love to try and sort something like this out, but I'd need to consider where the chording is scoped. I run i3wm/KDE Plasma and emacs, and I'm not quite sure where to begin with something like that.
- clircle 4y agoI feel like I'm living in both the golden age of ergonomic keyboards (kinesis, ergodox, etc) and the golden age of modal interfaces for Emacs (evil, devil, boon, meow, etc). Lots of new and interesting HSI ideas today, at least for us Emacs users.
- SeqDesign 3y agowhat is HSI?
- SoftTalker 4y agoThe postition of the comma key doesn't (to me) feel a lot better than the normal position of the CTRL key. I remap CAPS-LOCK (which I almost never use or want) to CTRL and that works well for me in emacs to reduce finger contortions. It does create minor annoyances when I have to use a computer where this isn't the case, since it's in my muscle memory now.
- alwaysbeconsing 4y agoUsing a sequence rather than a chord (or tap vs. hold) makes a big difference and I think it reduces the necessity of having the perfect spot. The author also mentions in the readme that it was inspired by laptop keyboards that are lacking that right-side CTRL, so even if it's not perfect for the majority of commands, it adds a little flexibility.
- eviks 3y agoHere how it's better: - stronger hand - stronger finger - better vertical movement instead of horizontal
- jrockway 4y agoThis is insane. I am going to try it immediately.
- lambdaloop 4y agoFor the past couple years, I've been using this hacked version of xf86-input-evdev (by Teika Kazura), which allows the use of a space bar for the space and as a "control" modifier if held: https://github.com/lambdaloop/at-home-modifier-evdev https://github.com/lambdaloop/at-home-modifier-evdev I made a small modification so that if the space key is pressed shortly after a regular character, it just inserts a space immediately. This makes typing feel more natural, with spaces inserted as usual. I like this better than using the comma as a modifier, as the space bar is nicely positioned on the keyboard to take advantage of your thumbs already. Day to day, it's such a natural extension that I forget that I have this on. However, this is the first thing I install when I set up a new computer, as otherwise a lot of shortcuts are much more strenuous. Edit: I just realized that, while editing this, I've been pressing space-backspace (aka ctrl-backspace with this module) to delete whole words. I guess it's fully ingrained now!
- precompute 4y agoThumb keys on an ergonomic keyboard are a much better solution to this issue.
- eviks 3y agoIt's a pity all those highly extensible vim/emacs editors ship with such awful unergonomic defaults and are so resistant to change, such a waste of a potential :( Relevant to this devil mode (and to a similarly named god mode): they do replace the pinky control, but they are still stuck with the default keycaps after that