Opened 13 years ago

Closed 13 years ago

#8536 closed enhancement (fixed)

Czech (Mac) keymap

Reported by: janiczek Owned by: jscipione
Priority: normal Milestone: R1
Component: Preferences/Keymap Version: R1/Development
Keywords: czech mac keymap Cc:
Blocked By: Blocking:
Platform: All

Description

Haiku has a Czech keymap, but Mac OS X uses a different layout. Aaaand I kind of missed it. O:-)

When I saw that other languages have Mac versions of the keymaps too, I created a Czech one (followed the Mac "Keyboard and Character Viewer" closely).

In the attachment.

My environment:

  • Walter (hrev44122-dirty), GCC 2
  • VMware Fusion, MacBook (Intel)

Attachments (6)

Czech (Mac) (7.5 KB ) - added by janiczek 13 years ago.
Binary version of the keymap
Czech (Mac).txt (16.6 KB ) - added by janiczek 13 years ago.
Text version of the keymap
czech_mac.jpg (250.2 KB ) - added by janiczek 13 years ago.
keymap as seen on mac
0001-Adds-Czech-Mac-keymap.patch (17.5 KB ) - added by janiczek 13 years ago.
final patch?
Czech (Mac).2.keymap (16.5 KB ) - added by janiczek 13 years ago.
fixed circumflex issue
Czech (Mac).keymap (16.5 KB ) - added by janiczek 13 years ago.
few more things (=, sysrq, pausebreak)

Download all attachments as: .zip

Change History (15)

by janiczek, 13 years ago

Attachment: Czech (Mac) added

Binary version of the keymap

by janiczek, 13 years ago

Attachment: Czech (Mac).txt added

Text version of the keymap

comment:1 by luroh, 13 years ago

Owner: changed from axeld to jscipione
Status: newassigned

Our resident Mac keyboard guru should probably czech this out.

in reply to:  1 ; comment:2 by janiczek, 13 years ago

Replying to luroh:

Our resident Mac keyboard guru should probably czech this out.

Yeah, be funny all you want :)

I'm just jumping ahead, but is there something more needed for the inclusion than copying the text version into src/data/keymaps/Czech (Mac).keymap?

in reply to:  2 comment:3 by jscipione, 13 years ago

Replying to janiczek:

Replying to luroh:

Our resident Mac keyboard guru should probably czech this out.

Yeah, be funny all you want :)

I'm just jumping ahead, but is there something more needed for the inclusion than copying the text version into src/data/keymaps/Czech (Mac).keymap?

As long as the file ends in .keymap it should get included in the image by build/jam/HaikuImage.

comment:4 by jscipione, 13 years ago

While I may be the Mac keyboard expert, I know nothing about Czech except for what I can look up online. A cursory look at the map most of it looks okay to me.

There are a couple of problems with the attached keyboard layout file though other than it should end in .keymap instead of .txt.

There is a number of spaces in the option map in keys other than 0x5e (the space key). This is true for many international maps though, is there a good reason for this?

Also, RCommand is not mapped. Looking at http://support.apple.com/kb/HT2841 the Czech standard keyboard has both left and right Command keys so it should be mapped AFAIK. The standard code to map RCommand to is 0x67.

Circumflex does not have a character defined in the first slot, but it does map dead key tables. Either put a

    '^'

there or don't include any dead key maps if circumflex is not used on a Czech keyboard.

I see that the 'S' key gets a character printed on the Apple Aluminum keyboard for the option map, but it looks like you also defined some characters for the 'A', 'D', 'H', 'J', 'L', and 'N' keys. Not knowing Czech I can't say if that is normal or not.

I'll have to investigate a bit more to see if the non-ASCII characters are all correct.

Last edited 13 years ago by jscipione (previous) (diff)

in reply to:  4 comment:5 by janiczek, 13 years ago

Replying to jscipione:

While I may be the Mac keyboard expert, I know nothing about Czech except for what I can look up online. A cursory look at the map most of it looks okay to me.

There are a couple of problems with the attached keyboard layout file though other than it should end in .keymap instead of .txt.

Yes, I didn't know about the .keymap extension convention until I found out where the keymaps live in the source code. I will use the right extension in the patch (if I am the one to patch it).

There is a number of spaces in the option map in keys other than 0x5e (the space key). This is true for many international maps though, is there a good reason for this?

This is probably because of the way I (and presumably the other keymap makers?) created the map in the Keymaps application. See, I drag'n'dropped the "empty character" (well, now we know it was a space) to the previously occupied keys before I put the right characters in their place.

So, the spaces don't really have a use. I will delete them in the .keymap file directly (the application doesn't give me a way to do it).

Also, RCommand is not mapped. Looking at http://support.apple.com/kb/HT2841 the Czech standard keyboard has both left and right Command keys so it should be mapped AFAIK. The standard code to map RCommand to is 0x67.

Yes, that escaped my attention. I'll add the RCommand there.

Circumflex does not have a character defined in the first slot, but it does map dead key tables. Either put a '' there or don't include any dead key maps if circumflex is not used on a Czech keyboard.

I'll remove the circumflex from dead key tables.

I see that the 'S' key gets a character printed on the Apple Aluminum keyboard for the option map, but it looks like you also defined some characters for the 'A', 'D', 'H', 'J', 'L', and 'N' keys. Not knowing Czech I can't say if that is normal or not.

These are all quirks of Mac keyboard layout and mathematical or Polish, I'd say, characters. That was blind copying of the Mac layout from my side. Or shouldn't I?

Oh, and I completely forgot the Option+Command combo. Whole new lot of characters that I'll never use :) Should I put them there? (Will attach a screenshot with all the variants.)

I'll have to investigate a bit more to see if the non-ASCII characters are all correct.

They're written at Mac, copied to pastebin.com and then retrieved on the Haiku box in virtual machine. (wget of the raw input, so no browser encoding reinterpreting)

So, recap:

  1. spaces -> empty strings (with the exception of spacebar, obviously)
  2. add RCommand
  3. remove circumflex from dead key tables
  4. add Option+Command set of characters, so it's mimicking the Mac layout completely? Should I?

by janiczek, 13 years ago

Attachment: czech_mac.jpg added

keymap as seen on mac

comment:6 by janiczek, 13 years ago

  1. done. Now the unassigned combinations fall through.
  2. done. And it's switched with the ROption.
  3. after discussion on IRC we found out that carons and rings aren't supported as dead keys in Haiku. So I did the following:
  • acute is acute, diaeresis are diaeresis, circumflex is circumflex
  • caron is in the place of tilde (PC Czech layout uses that too)
  • ring is in the place of grave
  1. since the Option and Command+Option layouts are not really all that useful for Czechs and they're more of a quirk of the Czech Mac keyboard layout, I didn't add them.

Two issues with the dead keys though:

  • ring ... none of 0xcb9a, 0xcc8a and 0xc2b0 works as intended (write ring, write letter -> have combined letter)
  • circumflex ... the same problem, tried '^', 0xcb86, 0xcc82

Because of these two things I don't yet consider this done. But I'm clueless on how to fix it.

comment:7 by janiczek, 13 years ago

Duh, had the wrong GraveTab and CircumflexTab.

Ring (at the place of grave) works great now, but circumflex still nothing. But I'm content to let it go, though, because its mainly use in Czech is for the programmers; as a dead key only use I can think of is some Slovak words.

Attaching a patch.

by janiczek, 13 years ago

final patch?

comment:8 by janiczek, 13 years ago

So, on IRC we fixed the circumflex thing. Attaching (hopefully) the final version.

by janiczek, 13 years ago

Attachment: Czech (Mac).2.keymap added

fixed circumflex issue

by janiczek, 13 years ago

Attachment: Czech (Mac).keymap added

few more things (=, sysrq, pausebreak)

comment:9 by jscipione, 13 years ago

Resolution: fixed
Status: assignedclosed

Included in hrev44139. Thanks for your hard work on this janiczek.

Note: See TracTickets for help on using tickets.