[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: portuguese keymap



Rodolfo Gouveia has a list of the wrong chars in this layout.

Printed on keyboard | Keymap

~                     :
^                     *
:                     +
*                     *
+                     <
*                     >
\                     ~
|                     ^

If there was a keymap for the Apple USB Keyboard(pt) it should be something like this

static const keysym_t ukbd_keydesc_pt[] = {
/* pos normal shifted altgr shift-altgr */
KC(31), KS_2, KS_quotedbl, KS_at,
KC(32), KS_3, KS_numbersign, KS_sterling,
KC(33), KS_4, KS_dollar, KS_paragraph,
KC(35), KS_6, KS_ampersand,
KC(36), KS_7, KS_slash, KS_braceleft,
KC(37), KS_8, KS_parenleft, KS_bracketleft,
KC(38), KS_9, KS_parenright, KS_bracketright,
KC(39), KS_0, KS_equal, KS_braceright,
KC(45), KS_apostrophe, KS_question,
KC(46), KS_plus, KS_asterisk,
KC(47), KS_masculine, KS_ordfeminine,
KC(48), KS_dead_acute, KS_dead_grave,
KC(50), KS_backslash, KS_bar,
KC(51), KS_ccedilla, KS_Ccedilla,
KC(52), KS_dead_tilde, KS_dead_circumflex,
KC(53), KS_backslash, KS_bar,
KC(54), KS_comma, KS_semicolon,
KC(55), KS_period, KS_colon,
KC(56), KS_minus, KS_underscore,
KC(100), KS_less, KS_greater,
KC(230), KS_Mode_switch, KS_Multi_key,
};



Miod Vallat wrote:
There are some issues with USB keyboards from Apple.


If I read this correctly, the only missing symbol is the paragraph
symbol as altgr-4, right?

Then what about this diff?

Miod

Index: makemap.awk
===================================================================
RCS file: /cvs/src/sys/dev/usb/makemap.awk,v
retrieving revision 1.1
diff -u -p -r1.1 makemap.awk
--- makemap.awk 2005/05/09 05:08:32 1.1
+++ makemap.awk 2005/05/11 10:03:05
@@ -35,6 +35,7 @@ BEGIN {
ifdepth = 0
ignore = 0
declk = 0
+ haskeys = 0
# PS/2 id -> UKBD conversion table, or "sanity lossage 102"
# (101 is for GSC keyboards!)
@@ -227,6 +228,7 @@ $1 == "#define" || $1 == "#undef" {
/pckbd/ {
gsub("pckbd", "ukbd", $0)
+ mapname = $4
print $0
next
}
@@ -238,6 +240,8 @@ $1 == "#define" || $1 == "#undef" {
if (declk)
next
+ haskeys = 1
+
sidx = substr($1, 4, length($1) - 5)
orig = int(sidx)
id = conv[orig]
@@ -288,16 +292,29 @@ $1 == "#define" || $1 == "#undef" {
next
}
- # Duplicate 42 (backspace) as 76
- # XXX maybe not correct anymore?
- lines[76] = lines[42]
- sub("42", "76", lines[76])
+ if (haskeys) {
+ # Duplicate 42 (backspace) as 76
+ # XXX maybe not correct anymore?
+ lines[76] = lines[42]
+ sub("42", "76", lines[76])
- for (i = 0; i < 256; i++)
- if (lines[i]) {
- print lines[i]
- lines[i] = ""
+ #
+ # Apple portugueuse USB keyboards provide extra symbols.
+ # We add them here.
+ #
+ if (mapname == "ukbd_keydesc_pt[]") {
+ lines[33] = \
+ " KC(33),\tKS_4,\tKS_dollar,\tKS_paragraph"
}
+
+ for (i = 0; i < 256; i++)
+ if (lines[i]) {
+ print lines[i]
+ lines[i] = ""
+ }
+
+ haskeys = 0
+ }
}
{
if (ignore)

-- Manuel Pata pata (ate) alface (dote) de



Visit your host, monkey.org