First find event handler of your second keyboard. Run
$ cat /proc/bus/input/devices
Find your second keyboard device in the output and note number of event handler. For example:
I: Bus=0011 Vendor=0001 Product=0001 Version=ab41
N: Name="AT Translated Set 2 keyboard"
P: Phys=isa0060/serio0/input0
S: Sysfs=/devices/platform/i8042/serio0/input/input2
U: Uniq=
H: Handlers=sysrq kbd event2
B: PROP=0
B: EV=120013
B: KEY=6007 2900000 83802078 f040d001 feffffdf ffefffff ffffffff fffffffe
B: MSC=10
B: LED=7
"H: Handlers=sysrq kbd event2" tells us that device we want to monitor is /dev/input/event2. Now we need to capture pressed keys. A useful tool is actkbd
- http://users.softlab.ece.ntua.gr/~thkala/projects/actkbd/ After downloading it and installing you can get keyboard codes with:
$ sudo actkbd -s -d /dev/input/event2
Pass event device you got before to -d
option. Tap keys you want to use, note their numbers and turn off actkbd
with Crtl+C shortcut.
To bind commands to shorcturs put into actkbd configuration file, /etc/actkbd.conf
, lines with following format: key-numbers:::command
and run actkbd
daemon again same way as before. For example to run gedit
after tapping a key put this line:
30:::gedit
Inserting Unicode characters is more tricky. I don't know if there is a way to insert those directly but I can propose a simple workaround. You can use xclip
or xsel
command to put any string into clipboard, and then paste it into any application you want using middle mouse button. Example configuration line using q button key:
16:::echo -n '✓' | xsel
This is possible using HTML and CSS.
The left and right characters don't exist in Unicode table. (I don't find them).
So I created them using following HTML code
<span>
<span style="position:relative; right:-12px; top:-2px;">┃</span>
⯇
</span>
<span>⯇</span>
<span>⯈</span>
<span>
⯈
<span style="position:relative; left:-12px; top:-2px;">┃</span>
</span>
Best Answer
For non-techies on Facebook, use workaround seen on Wikipedia: ⊞ Win.
Since you want to display the character on the Facebook where you have no control over fonts and there is no such character in Unicode at the moment, you can use mathematical operator Squared Plus (code point 229E) to imitate Windows logo as Wikipedia does in article on Windows key and in other keyboard-related articles.
Excerpt from the article:
I am doing it that way.