Skip Montanaro <skip.montan...@gmail.com> writes: > I know this is way off-topic for this group, but I figured if anyone > in the online virtual communities I participate in would know the > answer, the Pythonistas would... Google has so far not been my friend > in this realm. > > One of the things I really like about my Skype keyboard (and likely > other "soft" keyboards on Android) is that when you hold down a "key" > for a brief moment, a little mini keyboard pops up, from which you can > easily choose various accented variants and other symbols. For > instance, If I press and hold the "d" key, I see these choices (ignore > the capitalization of the first letter - my mistake sending a text > message to myself from my phone, and I can't seem to convert it to > lower case): Đ|¦&dðď > > While I'm a touch typist, I almost never use auto-repeat, which is the > "binding" of held keys in most environments (curse you, IBM and your > Selectric!). These days I find my self needing accented characters > much more frequently than key repeat (C-u 2 5 - suffices in Emacs to > bat out 25 hyphens). Being an American with an American keyboard, I > haven't the slightest idea how to type any accented characters or > common symbols using the many modifier keys on my keyboard, and no key > caps display what the various options are. And I'm getting kind of > tired of going to Google and searching for "degree symbol". :-/ > > Is there an X11 or Mac extension/program/app/magic thing which I can > install in either environment to get this kind of functionality? I'm > thinking that if you hold down a key for the auto-repeat interval, > instead of the key repeat thing making all sorts of duplicates, a > little window would pop up over/near the insertion point, which I can > navigate with the arrow keys, then hit RET to accept or ESC (or > similar) to cancel. It need not be perfect. It might (for example) > only work in certain environments (Chrome, Emacs, vim, Firefox). > Anyplace to start. It need even be written in Python (though that > would be cool.) I think that once something like this caught hold, it > would fairly quickly take over from the dark lords of auto-repeat. >
For very, very occasional use in emacs, there's C-x 8 RET (insert-char). From it's documentation: Interactively, prompt for CHARACTER. You can specify CHARACTER in one of these ways: - As its Unicode character name, e.g. "LATIN SMALL LETTER A". Completion is available; if you type a substring of the name preceded by an asterisk `*', Emacs shows all names which include that substring, not necessarily at the beginning of the name. - As a hexadecimal code point, e.g. 263A. Note that code points in Emacs are equivalent to Unicode up to 10FFFF (which is the limit of the Unicode code space). - As a code point with a radix specified with #, e.g. #o21430 (octal), #x2318 (hex), or #10r8984 (decimal). For your "degree symbol" example, I did C-x 8 RET, then typed in *degree<TAB>, and emacs found some matches, resulting in this: ° -- regards, kushal -- https://mail.python.org/mailman/listinfo/python-list