Giter VIP home page Giter VIP logo

xcompose's Introduction

.XCompose

As explained in http://canonical.org/~kragen/setting-up-keyboard.html, your Compose key in X11 is controlled by (among other things) the file .XCompose in your home directory. This file gives you a large set of bindings for Unicode characters that are useful occasionally.

More contributions are welcome; there's a Git repository at https://github.com/kragen/xcompose. We're trying to come up with a broadly acceptable set of keybindings that won't interfere with the traditional Compose bindings, aren't too hard to type, and cover a wide set of characters that are useful to use occasionally, making them available without the need for specialized input methods.

After installing .XCompose you will need to restart any applications to see its effect for that application. Not all applications support XCompose, and it depends on which input method you are using.

Some "extensions" have been added to this repository, and installing them may take a few more commands. Use make to generate the extension files (for emoji, modifier letters, etc.) You can include them by using the include directive in your .XCompose file. So you might actually not want to use our install script, but rather create your own .XCompose (perhaps with your own personal entries) along these lines:

 include "/path/to/dotXCompose"
 include "/path/to/frakturcompose"
 include "/path/to/emoji.compose"
 include "/path/to/modletters.compose"
 include "/path/to/parens.compose"

 # I complain a lot, oy...
 <Multi_key> <O> <Y>	: "ѹ" U0479	# CYRILLIC SMALL LETTER UK
 # My very original smileyface!
 <Multi_key> <parenleft> <t> <u> <parenright> : "㋡" U32E1 # CIRCLED KATAKANA TU
 # ...

xcompose's People

Contributors

amandasaurus avatar clsn avatar colah avatar gko avatar gwolf avatar hfs avatar kragen avatar l-as avatar paulv avatar sebleblanc avatar shizeeg avatar spookylukey avatar tokenrove avatar tpapp avatar wget avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xcompose's Issues

Instructions about restarting

I'm guessing I need to restart X for this to take effect?

Is there an easier way, especially for trying out my own additions?

Thanks!

add smileys

hi, there’s a number of smileys we could add, and i filed this bug for input. so we have:

  • :) → ☺
  • (: → ☻

but there’s much more

at least for some, e.g. ;) i really expect them to exist 😉

ELI5 on how to use all those bindings

I'm new to Xcompose and everything; I just found this repo with all those cool shortcuts; I know how to use <Multi_Key> to make some stuff, and I have a basic setup already in my Xcompose file e.g.
image

but I don't understand how to use maths-basic or any of the other files

what is the <M_> key means, and why {$#bK} in curly brackets and not <>
or what means etc. etc.

I couldn't find any explanation when searching google and I reached a point I found files like
/usr/include/X11/keysymdef.h
/usr/share/X11/xkb/symbols/lv

but they were more confusing that helpful

is there a chance to have some links or explanation on how to use everything?

Errors/warnings in XCompose

I'm using rofi, which uses xkb, which prints these errors in the console:

xkbcommon: ERROR: /home/bz/.XCompose:426:26: unrecognized keysym "equals" on left-hand side
xkbcommon: ERROR: /home/bz/.XCompose:939:47: unexpected token

Problematic lines are:

<Multi_key> <underscore> <equals>           : "₌"  U208C    # SUBSCRIPT EQUALS SIGN
<Multi_key> <backslash> <parenleft> <period>:   : "̐"  U0310   # COMBINING CHANDRABINDU

No licensing information?

I have taken the liberty to include your compose rules in my WinCompose project, which is an opensource compose key for Windows.
I’d like to know if you think your work qualifies for copyright; if it does, could you please choose a license for it? Otherwise, maybe you can clarify that it’s in the public domain, or not complex enough to be copyrighted? This would also make it easier to include it in Linux distributions.
Thanks in advance!

<Multi_key> <bar> <B> is a combination and a prefix at the same time

There is a set of combinations that start with <Multi_key> <bar> <B>:

<Multi_key> <bar> <B> <K>    : "♚" U265A  # BLACK CHESS KING
<Multi_key> <bar> <B> <Q>    : "♛" U265B  # BLACK CHESS QUEEN
<Multi_key> <bar> <B> <R>    : "♜" U265C  # BLACK CHESS ROOK
<Multi_key> <bar> <B> <B>    : "♝" U265D  # BLACK CHESS BISHOP
<Multi_key> <bar> <B> <N>    : "♞" U265E  # BLACK CHESS KNIGHT
<Multi_key> <bar> <B> <P>    : "♟" U265F  # BLACK CHESS PAWN
<Multi_key> <bar> <B> <D> <M>    : "⛂" U26C2  # BLACK DRAUGHTS MAN
<Multi_key> <bar> <B> <D> <K>    : "⛃" U26C3  # BLACK DRAUGHTS KING
<Multi_key> <bar> <B> <S>    : "☗" U2617  # BLACK SHOGI PIECE

However, <Multi_key> <bar> <B> is already reserved for

<Multi_key> <bar> <B> : "฿" U0E3F # BITCOIN CURRENCY SIGN, ORIGINAL THAI CURRENCY SYMBOL BAHT

IPA character based on XSAMPA

i would suggest mapping ipa characters by using xsampa
Xsampa is a mapping of ipa characters based on ascii
a problem might be that we'd need to prefix all the bindings with some character first, as many xsampa sequences are single letter sequences

How to load ~/.XCompose file in other input methods except xim?

I met a problem in loading compose file while using fcitx input method for Chinese characters.

The situation is, I can either type compose characters with "im-switch -s xim", or type Chinese with "im-switch -s fcitx", But not both.

If it can't be loaded,
I think it would be preferred to add customized compose keys in some place recognized by fcitx rather than defining a new keyboard layout for characters in .Xcompose.

About greek letters

I didn't see anyway to produce greek letters. Did I miss something? Same question for Hebrew.

Since these alphabets are commonly used mathematical papers, it would be a good idea to add them.

how to become a maintainer

i really love this project and would love to see it continue, but its basically dead at this point. only clsn pops in every couple of months to edit something without merging pull requests (that dont conflict with anything and would just enrich the compose key) and without looking at any of the open issues…

i know this sounded very angry, im just trying to help out the situation of this project. i added a ton of compose sequences and i want other ppl to be able to enjoy them too is all. (after all, thats whats so great about open source projects)

Bitcoin now has a specific unicode char

It was approved recently, so the fonts doesn't support it yet. When we should update the compose binding?
The new code is U+20BF ₿
The old was U+0E3F ฿

Should we remove the other signs?
Ƀ and ƀ

Wayland

So does anyone know how to get it working in Wayland?
It's easy to enable the compose key in Gnome, but I have no idea how to actually add new keys.

Define sequence for ʻOkina / MODIFIER LETTER TURNED COMMA (U+02BB)

It'd be nice to have a standard key sequence for the ʻOkina, a character used to write Hawaiian. The question is what key sequence.

I'm personally using <grave> <grave>. It's easy to type and mnemonic. Unfortunately that's already defined in this repository to be U201C. I don't know how people would feel about redefining something: there are other definitions that also input U201C.

The Hawaiian input method on Windows rebinds the apostrophe to mean ʻOkina. That'd be an argument to use the apostrophe key somehow.

It'd be smart to get suggestions from folks who write Hawaiian regularly. I'm not one.

Systematizifcationizing?

The Fever

So, I only discovered XCompose recently, and I found it exciting. Then, stumbling upon kragen/xcompose was double-exciting, but almost instantly I want to find myself triple-excited. This is a very rapid onset of addiction. I'm basically the guy described here: http://youtu.be/8r1CZTLk-Gk

Proposed Solution

I think the project needs some overlays. We already have /usr/share/X11/locale/en_US.UTF-8/Compose as a base layer, with ~/.XCompose stacking on top of it. But, in my opinion, there should be more user preferences that go on top of that.

Implementation?

I modified my kragen/xcompose output to have this:

include "/home/rking/.XCompose-local"

...and it seems to work cleanly for the case where it's absent (e.g., I couldn't find any error messages) and it does use those mappings when it is present.

The downside is that I couldn't figure out a way to get rid of the hard-coded username. I tried:

include ".XCompose-local" # only works for programs started in ~
include "~/.XCompose-local" # Nope.
include "$HOME/.XCompose-local" # Nope.
include "/home/$USER/.XCompose-local" # Nnnope.
...I think that's all I had before I punted and used the full path.

So basically my thinking is that there would be a Makefile whose default task did a git pull then runs a modified version of the current install script which fills in that blank using $HOME.

vim digraphs

Last week I goofed around munging the output of vim's :digraph and came up with this: http://panoptic.com/rking/doc/vim-digraphs-full-oneline.txt

It would take about 3 minutes to convert that to XCompose lines. If you're up for it, I'd love to figure out a way to include it into this repo with some kind of opt-in/opt-out.

Design Philosophy?

I can see from the comments that you put a good bit of thought into what bindings get what codepoints. There is definitely some tension between providing guessable shortcuts vs. locking yourself into supporting a binding that you wish you used a different way.

That's why the overlays helps. You can make the stock .XCompose have the one's you're most sure about. For example, should indubitably be →. But what about ←? Currently it is , which makes some sense, but I imagine I'm not the only one who looked for instead. If you had another line that did:

include "/home/rking/.XCompose-even_more"

...then you could throw in such synonym mappings, with the caveat that they are less guaranteed in the future than the ones in the main .XCompose.

...what do you think?
-☈

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.