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

For efforts in internationalising Puppy and solving problems in this area
Post Reply
Message
Author
User avatar
kkpity
Posts: 112
Joined: Mon 27 Nov 2006, 16:16
Location: Brazil

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

#1 Post 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
Last edited by kkpity on Mon 04 Dec 2006, 22:45, edited 1 time in total.

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#2 Post 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

User avatar
dewdrop
Posts: 298
Joined: Tue 30 Aug 2005, 01:54
Location: Texas USA

How to put portuguese accentuation in a US keyboard?

#3 Post 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

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#4 Post by GuestToo »

br = Brazillian Portuguese
pt = Portuguese

User avatar
kkpity
Posts: 112
Joined: Mon 27 Nov 2006, 16:16
Location: Brazil

#5 Post 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

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#6 Post 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)

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#7 Post 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

User avatar
pakt
Posts: 1157
Joined: Sat 04 Jun 2005, 16:54
Location: Sweden

#8 Post 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
Methinks Raspberry Pi were ideal for runnin' Puppy Linux

User avatar
kkpity
Posts: 112
Joined: Mon 27 Nov 2006, 16:16
Location: Brazil

#9 Post 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

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#10 Post 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

Post Reply