Page 1 of 1

How to put portuguese accentuation in an US keyb? (resolved)

Posted: Wed 29 Nov 2006, 10:53
by kkpity
Hi,

I'm trying to put Portuguese accentuation on my laptop that has a US keyboard.

I've tried to change keyboard layout, but I think the layout is correct (US).

Maybe I have to change to the abnt2 (Brazilian accentuation???) but I do not know how to do that.

I've already tried to search on this forum with no success.

Just to exemplify...

When I type ' plus c the result should be ç (I'm using a different keyboard).

I cannot produce ç using my laptop keyboard.

Can somebody help me?

Thanks in advance!

kkpity

Posted: Wed 29 Nov 2006, 16:44
by GuestToo
which version of Puppy are you using? ... there are differences in the version of Xorg and xkb ... the newer xkb is a little bit different from the older versions of xkb

for Puppy 212:

you can edit the file xorg.conf in /etc/X11/, then restart X windows (from the menu, or you can press ctrl+alt+backspace, then type startx)

Portuguese keymap:

Option "XkbLayout" "pt" #xkeymap0

or:

Option "XkbLayout" "pt" #xkeymap0
Option "XkbVariant" "basic"

or (i don't think you want this):

Option "XkbLayout" "pt" #xkeymap0
Option "XkbVariant" "sundeadkeys"

or:

Option "XkbLayout" "pt" #xkeymap0
Option "XkbVariant" "nodeadkeys"

Brazillian keymaps:

Option "XkbLayout" "br" #xkeymap0

or:

Option "XkbLayout" "br" #xkeymap0
Option "XkbVariant" "abnt2"

or:

Option "XkbLayout" "br" #xkeymap0
Option "XkbVariant" "nodeadkeys"

US keymaps:

Option "XkbLayout" "us" #xkeymap0

or:

Option "XkbLayout" "us" #xkeymap0
Option "XkbVariant" "basic"

or:

Option "XkbLayout" "us" #xkeymap0
Option "XkbVariant" "intl"

or:

Option "XkbLayout" "us" #xkeymap0
Option "XkbVariant" "alt-intl"

or:

Option "XkbLayout" "us" #xkeymap0
Option "XkbVariant" "dvorak"

or:

Option "XkbLayout" "us" #xkeymap0
Option "XkbVariant" "rus"

you may want to set the number of keys on your keyboard, if it is not set properly, for example:

Option "XkbModel" "pc105"

the older versions of xkb had "en_US" and "us_intl" ... the newer xkb does not seem to have those keymaps, i think you have to specify the keymap variant instead, which may not give you exactly the same keymap

on the pt keymap, ç seems to be the ; key on a us keyboard ... you do not need to press 2 keys to get a ç

there are at least 4 ways to get an accented diacritical:

1) remapping the keys ... just press a key to get the character ... like pressing the ; on a us keyboard gives you a ç with the pt keymap

2) the Mode_switch key ... like an extra shift key, holding the Mode_switch key and pressing a key will give you a different character, just like holding the shift key gives you different characters

3) the Multi_key ... press and release the Multi_key, press and release an accent key, like the ' key, then press and release a character, like e, to get é

4) dead keys ... press ' (nothing is displayed) then press e to get é

various keymaps have the keys set up in different ways ... i'm not sure what keymaps you were using before, it might have been "en_US" or "us_intl" ... i'm not sure if the newer variants have exactly the same mapping ... you might be able to copy the old keymap file and use it, i'm not sure if that would work properly or not

you could also try using setxkbmap, like this:

setxkbmap -layout us -variant alt-intl

see: http://www.murga-linux.com/puppy/viewtopic.php?t=12380
and: http://www.murga-linux.com/puppy/viewtopic.php?t=13215

How to put portuguese accentuation in a US keyboard?

Posted: Wed 29 Nov 2006, 17:11
by dewdrop
Hi kkpity,

If you know your 2 letter brazilian keyboard letters, go to the topic noted below, go thru the step by step, and put them where you see the latam (meaning Latin American) keyboard. That step by step is for Puppy 2.12....but it should work for other versions as well.

It looks like the 2 letters you use for Brazilian are pt....according to the GuessToo post.

http://www.murga-linux.com/puppy/viewtopic.php?t=13215

With this method, you will have the 2 languages on your keyboard... English and Brazilian

Regards,

dewdrop

Posted: Wed 29 Nov 2006, 18:01
by GuestToo
br = Brazillian Portuguese
pt = Portuguese

Posted: Thu 30 Nov 2006, 00:07
by kkpity
Thanks everybody for your fast reply and so detailed steps!

Unfortunately I couldn't fix the keyboard issues, but I think I am almost there.

I'm using puppy 2.12

File /etc/X11/xorg.conf is pretty small here.

I couldn't find any line related to keyboard :?

Anyway, I inserted the following lines at the end of the file:
# us keyboard with Brazilian accentuation
Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "XkbLayout" "us,br"
Option "XkbOptions" "grp:alt_shift_toggle,grp_led:scroll,caps:shift,altwin:menu"
EndSection

After that I re-started X (ALT Backspace -> startx).

There were no changes.

#############
Testing with command "setxkbmap -layout br -variant alt-intl "

It changed the keyboard in a way that I didn't like:

Now, when I press the key :; (it is a key right after L letter) I can produce the "cedilla", but I miss the character : and ;

I would like to have the way that I always had used (at least for this time):

press ' plus c to produce the "cedilla".

It's getting late... so I will perform more tests tomorrow.

Thanks again for your replies.

Regards,

kkpity

Posted: Thu 30 Nov 2006, 02:51
by GuestToo
as i said, i think the newer version of xkb has changed a little (not just in Puppy) ... i'm not sure if the exact configuration you used before is available (you can probably makes the keys do exactly what you want, if you know how, the keymaps are very configurable)

the keymaps i tried had deadkeys ... i could press ~ then o to get õ ... but , then c did not work to produce ç ... so i'm not sure if that method is configured in one of the keymaps or not

you might be able to copy the keymap file from an older version of Puppy, i don't know if it would work ... maybe the file would be named us_intl ... in Puppy 212 the keymap files are in /etc/X11/xkb/symbols/ ... then you would put
Option "XkbLayout" "us_intl"
in xorg.conf

you can get the regular ; and : keys by holding the modeswitch key ... it's probably the extra alt key on the right (AltGr)

i think what you want is not a pt or br keymap ... i think you want a us_intl keymap (or en_US, something like that ... en_US does not seem to be included with xkb anymore)

Posted: Fri 01 Dec 2006, 00:56
by GuestToo
i think that the us intl variant is set up this way:

press level3 key plus , to get ç
press level3 key plus < to get Ç

i think that the us alt-intl variant is set up this way:

press level3 key plus , to get cedilla dead key ... then press c to get ç

press level3 key plus < to get caron dead key ... then press c to get

Posted: Sun 03 Dec 2006, 19:45
by pakt
kkpity wrote: I'm using puppy 2.12

File /etc/X11/xorg.conf is pretty small here.

I couldn't find any line related to keyboard :?
kkpity, are you using Xvesa or Xorg for your graphics? If you can't find a line related to keyboard in xorg.conf, then it sounds like you are running Xvesa. In that case Xkb will not work for you - that only works if you are running Xorg. :(

If you switch to Xorg, then I have also written a work-around for you to get a 'ç' on your keyboard. I had not read this thread when I posted it. My work-around is here:
http://www.murga-linux.com/puppy/viewto ... 2064#82064

Paul

Posted: Mon 04 Dec 2006, 22:42
by kkpity
Paul,

You got the point!

In fact I was not using Xorg :oops:

After changed everything, I could solve this issue.

Please see more details at this post:
http://www.murga-linux.com/puppy/viewto ... 2391#82391

I will change this post to "resolved".

Thanks everybody for the valuable helps!

I'm loving puppy!

kkpity

Posted: Tue 05 Dec 2006, 00:52
by GuestToo
Testing with command "setxkbmap -layout br -variant alt-intl "

It changed the keyboard in a way that I didn't like:

Now, when I press the key :; (it is a key right after L letter) I can produce the "cedilla", but I miss the character : and ;
i read this so i assumed that your keymap was being changed, so i figured that you must have been running Xorg

so ... setxkbmap can change the keymap, whether you are using Xorg or Xvesa ... that is interesting to know ... so a keymap wizard can set the keymap whether you are running Xvesa or not