Bluetooth keyboard workaround

56 views
Skip to first unread message

Ezra

unread,
May 8, 2010, 4:05:07 PM5/8/10
to iSSH/iX11
Just posting this at the top level for those who have to work with the
bluetooth keyboard and are missing control key and arrow key
functionality.

There is somewhat of a workaround.

One thing the bluetooth keyboard *does* send are the ALT key
combinations. So, if you use GNU screen, what you can do to remap the
special characters ALT-foo sends to the equivalent control character C-
foo or any other special character by placing "bindkey" commands in
your .screenrc. e.g:

bindkey "x" stuff \003

Maps typing "x" to control-C. Obviously, you type the actual ALT-C
(*on your bluetooth keyboard*) inside the quotes when
editing .screenrc -- I can't make ALT characters show up in this edit
box so I have to use x :-)

You can get create mapping ALT-(h,j,k,l) to arrow keys etc, read the
screen man page and play around.

Ezra

--
You received this message because you are subscribed to the Google Groups "iSSH/iX11" group.
To post to this group, send email to is...@googlegroups.com.
To unsubscribe from this group, send email to issh+uns...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/issh?hl=en.

Jeff Clithero

unread,
May 8, 2010, 5:58:26 PM5/8/10
to is...@googlegroups.com
Thank you Ezra! This will indeed be quite useful.

Jeff Clithero
Eris Technologies
360-390-4112
Helpdesk, click: https://help.ioltd.com

Dean

unread,
May 8, 2010, 11:33:21 PM5/8/10
to iSSH/iX11
I hadn't noticed this behaviour before! Thanks for bringing it to my
attention. Unfortunately these characters are generated the same way
they are on a regular mac keyboard, which means that I can't retool
them without breaking international character set compatibility.

Deam
> > For more options, visit this group athttp://groups.google.com/group/issh?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups "iSSH/iX11" group.
> To post to this group, send email to is...@googlegroups.com.
> To unsubscribe from this group, send email to issh+uns...@googlegroups.com.
> For more options, visit this group athttp://groups.google.com/group/issh?hl=en.- Hide quoted text -
>
> - Show quoted text -

Jeff Clithero

unread,
May 9, 2010, 9:35:51 PM5/9/10
to is...@googlegroups.com
Again, thank you, thank you Ezra... I've made a .screenrc setup using
the screen 'bindkey' in my .screenrc. My terminal string is set to
'xterm'.

Below you'll find a cut from my working "~/.screenrc" and may be a
starting point others. I also found that (option/ALT Key)-(TAB-Key)
is already mapped to 'TAB' in and out of 'screen'.

################### cut from ~/.screenrc ###################
#F10===(alt-0)
bindkey º stuff \033[21~
#F5===(alt-5)
bindkey ∞ stuff \033[15~
#F7===(alt-7)
bindkey ¶ stuff \033[18~
#PageUp===(alt-O)
bindkey ø stuff \033[5~
#Up Arrow===(alt-K)
bindkey ˚ stuff \033[A
#Right Arrow===(alt-L)
bindkey ˙ stuff \033[D
#Down Arrow===(alt-J)
bindkey ∆ stuff \033[B
#Left Arrow===(alt-H)
bindkey ¬ stuff \033[C
#Control-D===(alt-D)
bindkey ∂ stuff \004
#Control-C===(alt-C)
bindkey ç stuff \003
#Control-W===(alt-W)
bindkey ∑ stuff \027
#Control-R===(alt-R)
bindkey ® stuff \022
#PF1===(alt-1)
bindkey ¡ stuff \033OP
#PF2===(alt-2)
bindkey ™ stuff \033OQ
#PF3===(alt-3)
bindkey £ stuff \033OR
#PF4===(alt-4)
bindkey ¢ stuff \033OS
#F6===(alt-6)
bindkey § stuff \033[17~
#F8===(alt-8)
bindkey • stuff \033[19~
#F9===(alt-9)
bindkey ª stuff \033[20~
#PD===(alt-M)
bindkey µ stuff \033[6~
#################### end of cut from ~/.screenrc ################

Obviously might only work with a standard english keyboard since it
doesn't use the double byte international characters. I was able to
enter the bindkey characters with a standard mac keyboard by holding
(option/ALT key) and the number or alpha substitute character, ie.
ALT-C == ç and I mapped it to CTRL-C using the 'stuff \003' syntax
listed above, I had to lookup PF1-PF4 and the F5-F10 keys.

By adding these keys I can now keep my hands almost entirely on the
keyboard which is practically perfect!

One additional trick, on my systems, both mac and linux versions of
screen, I had to put the keys in the order listed to get them to
'take', don't know why, but after trying them in sequential order,
some didn't work until I moved them to the top of the list.

Enjoy!


Jeff
Reply all
Reply to author
Forward
0 new messages