Kitty: Support for Unicode input?

Created on 1 Feb 2018  路  13Comments  路  Source: kovidgoyal/kitty

Hi, I was searching quite some time now to see if Unicode input as defined below is supported as it is in termite with Ctrl+Shift+u+unicode_numbers?

https://en.wikipedia.org/wiki/Unicode_input

enhancement

Most helpful comment

And all this with a pure keyboard based UI, in less than 500 lines of code, thanks to the magic of kitty's kittens :)
screenshot_20180213_105622

All 13 comments

im pretty sure that Ctrl+Shift+u is a gtk specific feature

@SolitudeSF yes it is a GTK specific feature that I use regularly ...
Any idea how to mimic that in kitty?

Note that most applications have their own unicode input technique, for example in vim it is ctrl+v,u,hex code. In zsh you use insert-composed-char (http://zsh.sourceforge.net/FAQ/zshfaq05.html) etc.

Yes I'm aware of the Unicode input techniques for vim and zsh and I use them but I'd also like to be able to do that in weechat and I haven't found a possibility yet. Hence my question ...

Well, it shouldn't be too hard to add unicode input support using the new overlay windows facility I am working on right now. It should be much nicer than GTK's ctrl+shift+u since it will show you active previews of the character you are typing and could, in theory, also have a choose character by name mode.

ALso, if you have a limited set of unicode chars you want to input, you can simply define keyboard shortcuts for them in kitty.conf using the send_text feature. For example:

map ctrl+shift+f4 send_text all 蟻蟽

im pretty sure that Ctrl+Shift+u is a gtk specific feature

Nope, or at least not solely. Konsole (KDE/Qt), xterm (plain Xlib) etc. also support this shortcut. It's more like an IM (input method) / ibus thingy.

Note that currently the unicode input widget is pretty barebones (though still better than what you get in GTK), it allows you to type in the hex code and shows you what character will be input. I'll add features to it to search by character name and to remember recently used chars later.

Thank you so much!!! That looks already very promising and I see that you're still refining it. Many thanks for that :)

You're welcome :)

I finished the unicode input widget. It allows searching for characters by name, by hex code, by recently used, and even an editable favorites list. This is now the coolest unicode input widget I have ever used :)

And all this with a pure keyboard based UI, in less than 500 lines of code, thanks to the magic of kitty's kittens :)
screenshot_20180213_105622

It's getting better every day with all that kittens ... ;-)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JJGO picture JJGO  路  3Comments

RedBeard0531 picture RedBeard0531  路  4Comments

hdriqi picture hdriqi  路  3Comments

wavexx picture wavexx  路  3Comments

atomsymbol picture atomsymbol  路  3Comments