Russ Cox is sharing code with you

Bitbucket is a code hosting site. Unlimited public and private repositories. Free for small teams.

Don't show this again

rsc / plan9port http://swtch.com/plan9port/

Plan 9 from User Space (aka plan9port) is a port of many Plan 9 programs from their native Plan 9 environment to Unix-like operating systems. See the web site http://swtch.com/plan9port/ for details.

Clone this repository (size: 58.2 MB): HTTPS / SSH
hg clone https://bitbucket.org/rsc/plan9port
hg clone ssh://hg@bitbucket.org/rsc/plan9port

Issues

#32 OSX spanish-iso keyboard dead keys

Reported anonymously (last edited )

In OSX with spanish-ISO keyboard, the rune 0xfffd is generated when any acute (`´^¨) dead key is pressed, so acme prints a � before the letter with the acute. This rune (0xfffd) should be ignored in texttype(), text.c.

Regards, esoriano@lsub.org

Status: resolved Responsible: Russ Cox Type: bug Priority: major
Milestone: none Component: none Version: none

Attachments

No attachments added for this issue yet.

Comments and changes

  1. #1 Russ Cox

    written

    • Changed status from new to open.
    • Changed responsible from nobody to rsc.

    It's more likely that the Spanish ISO keyboard is generating runes or UTF-8 sequences that the code doesn't like, which is what causes the 0xfffd (Runeerror). It would be helpful to track down what is generating them.

    The relevant function is $PLAN9/src/cmd/devdraw/osx-screen.c:/^kbdevent

  2. #2 esoriano

    written

    In kbdevent(), when an acute key is pressed down, the character ch set by GetEventParameter is 0x00, the event kind is kEventRawKeyDown and the modificator is 0x00, so keystroke() is called with 0x00, and then keystroke() calls kputc().

    If I don't miss anything, I think this would fix it:

    ($PLAN9/src/cmd/devdraw/osx-screen.c:488)

     	if(k == 0)
    		return noErr;
    	else if(k > 0)
    		keystroke(k);
    	else{
    		UniChar uc;
    		OSStatus s;
    		...
    
  3. #3 Russ Cox

    written

    I suggest applying that change to your local copy and then running "mk install" in the devdraw directory. Then restart acme or sam or any other program and see if it fixes the problem.

    If so, and if you are using Mercurial to check out the source, please submit the change using codereview(1). Thank you.

  4. #4 esoriano

    written

    I've been using a modified devdraw for two days, it seems to work ok with the spanish-iso layout.

  5. #5 Russ Cox

    written

    Are you using Mercurial?

    If so, please submit the patch using codereview(1). Thanks.

  6. #6 esoriano

    written

    I've installed mercurial and submitted the patch (the subject is the name of this issue).

    Regards

  7. #7 Russ Cox

    written

    • Changed status from open to resolved.

Add comment / attachment

Verification: Please write the text from the image in the box (letters only)

captcha

Is that you, Humanoid? Is this me?