French accents on a FreeBSD Lenovo laptop
The need
I recently bought a Lenovo t440p laptop, and have installed FreeBSD on it.
Of course, I'm using a QWERTY (UK) keyboard, and sometimes I do write emails or documents (or even blog posts!) in French, so I have to type accents.
Fixing it
In order to do this, you just need to add the below line to your ~/.xinitrc
:
setxkbmap -option compose:lwin
This sets up the Compose key to be the left Windows key.
Then if you need to type é, you press Windows+', then release them, then e
Testing it
This works for all the accents I had to do:
- è => Win+` then e
- ê => Win+Shift+6 then e
- ë => Win+Shift+2 then e
etc
This is similar to how I type accents on my work MacOS laptop (also running a QWERTY layout, but US that type) - the composer key is different, but the philosophy is the same.
Bonus
I even realised that you can use the letter and the accent key in any order
you want, so instead of Win+' then e
for é, you can do Win+e, then '
- this
is really neat :)