6 ms·
How do I type a ←?
by lunixbochs 7y ago
How do I type a ←?
- ken 7y agoEven my least-tech-savvy friends manage to type 25 variations of the yellow smiley face. I'm sure if this were added to the language, Python programmers (and Python editor programmers) would manage to find a way.
- speps 7y agoBy copy/pasting it from OP's text like you probably just did :)
- jshaqaw 7y agoBuy one of these: https://www.dyalog.com/uploads/images/Business/products/us_rc.jpg https://www.dyalog.com/uploads/images/Business/products/us_r...
- sedachv 7y agoKeyboards generate scan codes, not characters. The character translation is all done in software. How do you think input language selection works?
- mftrhu 7y agoIf you are inside of Emacs you could change the input method to TeX and type \leftarrow, or press C-x 8 ENTER and write LEFT ARROW, or enable the Compose key system-wide and do Compose + < + -, or copy-paste it, or buy a new keyboard, or curse whoever thought that building a programming language out of modern hieroglyphs was a good idea and then jump ship to Julia. Or something.
- gnulinux 7y agoJust my 2 cents: I install agda2-mode (official emacs mode of Agda programming language) which supports all sorts of mathematical shortcuts. This way you can type unicode without C-x 8 ing since it's automatic once you type \leftarrow SPACE
- mftrhu 7y agoI just use the builtin `abbrev` for that. I took the idea from http://home.thep.lu.se/~karlf/emacs.html#sec-7-2 http://home.thep.lu.se/~karlf/emacs.html#sec-7-2 , and defined a bunch of global abbrevs under the `8` "namespace", for greek letters, mathematical symbols, and random unicode characters (a few ASCII ones, too). One cool thing about `abbrev` is that it can also expand a function instead of a sequence of characters - e.g., ("9ts" "" (lambda () (insert (format-time-string "%Y-%m-%d %H:%M")))) It's pretty handy when I access emacs from Termux, as I don't have to bother with switching the input method or long pressing (which is an issue even with Hacker's Keyboard, trying to insert `\`).
- jessaustin 7y agoIt looks a lot like <- Coffeescript has had -> and => for a long time.
- cestith 7y agoAnd Perl long before that.
- deleted 7y ago[deleted]
- xelxebar 7y agoIncidentally, I was surprised to find an apl keyboard layout installed on my machine by default: $ find /usr/share/X11/xkb/ -name '*apl*' /usr/share/X11/xkb/symbols/apl Apparently, it's from XKeyboardConfig[0]. Taking an actual look at the layout file, you can see that there are lots of variants to choose from as well! $ sed -n '/xkb_symbols/s/.*"\([^"]*\)".*/\1/p' /usr/share/X11/xkb/symbols/apl basic common unified sax apl2 aplplusII aplx dyalog_base dyalog_box dyalog_codes dyalog [0]:https://www.freedesktop.org/wiki/Software/XKeyboardConfig https://www.freedesktop.org/wiki/Software/XKeyboardConfig
- petschge 7y agoBy hitting the compose key [1] followed by "<" and "-". 1: https://en.wikipedia.org/wiki/Compose_key https://en.wikipedia.org/wiki/Compose_key
- vthriller 7y agoBetter yet, you can even define your own combo. Here's how I type it with compose + left-arrow twice: $ grep ← .XCompose <Multi_key> <Left> <Left> : "←" (I use double press to distinguish from compose, ←, → which I bound to ↔. If you don't need that, "<Multi_key> <Left>" alone will probably be enough.) You might want to change IM module though, as not all of them work with .XCompose reliably.
- _kst_ 7y agoIn vim, Ctrl-K < - ":help digraphs" for more information. (Personally I think that's still too much typing for a common operator.)