Menu

How can I create a backslash?

Help
Vinai Kopp
2000-02-23
2000-02-28
  • Vinai Kopp

    Vinai Kopp - 2000-02-23

    Hello,

    first: thanks for making the effort to port emacs to MacOS! I love it to be available here, too!

    My Problem: I'm using a german keyboard layout, and the backslash (and a lot of other speacial Characters like @\[]{} also) are written with shift-alt or simply alt-(some_key) combinations.

    I've set mac-command-key-is-meta to 1, but the alt key isn't freed, it doesn't do anything now :(.

    How could I get around this problem?

    Thanks for reading this,

    Vinai

     
    • Andrew Choi

      Andrew Choi - 2000-02-25

      Could you please verify that after mac-command-key-is-meta is made non-nil, the command key does indeed work as the meta key?

      If it does and the alt/option key doesn't work, there may be a more obscure problem.  Will you be able to help debug it by using the CodeWarrior or MPW debugger?

      If you are using d5 pre, please also make sure mac-latin-keyboard is set to nil.

       
      • Vinai Kopp

        Vinai Kopp - 2000-02-25

        Yes, the command-key does work as the meta-key. No problem with that.

        I don't read/write C, only perl/php3 and some other script stuff, just beginning on lisp, so if C is neccesary to do the debugging I'm sorry.

        I have been wanting to install MPW for a long time, and this might be the oportunity to do so.

        I would need a pointer to how I can start debugging MacEmacs.

        If you think thats worth your time, I'll be happy to see what I can do.

        mac-latin-keyboard is set to nil, and the problem still persists.

         
        • Andrew Choi

          Andrew Choi - 2000-02-25

          Would you please run the test program in

          ftp://mac-emacs.sourceforge.net/pub/mac-emacs/KeyTransTest.sea.bin

          and let me know what it prints out.  Follow these steps:

          Once expanded, run the application "Std C Console PPC".  Type the keys you have problems with: \ [ ] { } .  Type 'q' to terminate the program.  When asked, save the output of the program and post or send that to me.  On my computer, setting a German keyboard layout in the Keyboard Control Panel, the output is

          Print a string to initialize toolbox.
          char = 5c, modifier = 0a80, keycode = 1a
          char = 5b, modifier = 0880, keycode = 17
          char = 5d, modifier = 0880, keycode = 16
          char = 7b, modifier = 0880, keycode = 1c
          char = 7d, modifier = 0880, keycode = 19
          char = 71, modifier = 0080, keycode = 0c

          One can check that the ASCII code for the sequence of characters are \ [ ] { } and q, respectively.

           
          • Vinai Kopp

            Vinai Kopp - 2000-02-25

            The key's I pressed are:

            Keys ---> Character
            alt+5     ---> [
            alt+6     ---> ]
            alt+7     ---> |
            alt+8     ---> {
            alt+9     ---> }
            alt+n space ---> ~
            shift+alt+7 ---> \

            Here is the output that I got from your Program:

            char = 5b, modifier = 0880, keycode = 17
            char = 5d, modifier = 0880, keycode = 16
            char = 7c, modifier = 0880, keycode = 1a
            char = 7b, modifier = 0880, keycode = 1c
            char = 7d, modifier = 0880, keycode = 19
            char = 7e, modifier = 0080, keycode = 31
            char = 5c, modifier = 0a80, keycode = 1a
            char = 71, modifier = 0080, keycode = 0c

             
            • Andrew Choi

              Andrew Choi - 2000-02-26

              Your keyboard is generating the same char and modifier codes as mine.

              Could you please try the following to see if events are read
              correctly.  Type the line

                (read-event "?" t)

              somewhere in the *scratch* buffer.  Then, making sure that the cursor
              is at the end of it, type C-x C-e.  When prompted (by a "?"), type one
              of the characters you have problems with and write down what value is
              printed in the mini-buffer.  Repeat this for each character you want
              to check.

              Would you do this and send me the results?  Thanks.

              It just also occurs to me.  On the German keyboard there are two different
              hyphens.  Did you use the right one in the name mac-command-key-is-meta?

              Andrew.

               
              • Vinai Kopp

                Vinai Kopp - 2000-02-28

                Here is what I get:

                alt+5 ---> [ ---> 53
                alt+6 ---> ] ---> 54
                alt+7 ---> | ---> 55
                alt+8 ---> { ---> 56
                alt+9 ---> } ---> 57
                alt+n space ---> ~ ---> 32
                alt+shift+7 ---> \ ---> 47

                I believe I use the correct hyphen, since it works with other settings as well. Setting mac-command-key-is-meto to nil also works as expected.
                Thanks for diging into this with me!

                 
                • Vinai Kopp

                  Vinai Kopp - 2000-02-28

                  Just for clarification of my previous post:

                  When I write

                     alt+5 ---> [ ---> 53

                  I mean that when I type alt and 5, which is the character [ on the german keyboard, the code 53 gets printed in the minibuffer.
                  The [ doesn't display.

                  Also, the backslash \ (alt+shift+7) doesn't get printed in the html view of the post, but it appears in the eMail.

                  Vinai

                   
                  • Andrew Choi

                    Andrew Choi - 2000-02-28

                    I think I know exactly what the problem is.  You are running d4 or
                    earlier.  There is an outstanding problem with keyboard input in d4
                    which was fixed in d5 pre.  Would you please find the version that is
                    released on 30 January 2000 and try that.  Open the "about box" to
                    check the version.  I apologize for the confusion.  I'm not very good
                    at version control.

                    Andrew.

                     
                    • Vinai Kopp

                      Vinai Kopp - 2000-02-28

                      OK! Downloading 20.5 fixed the problem. Wow, it looks a lot better!
                      I found the Mac Version on www.emacs.org, where at first glance it looked like 20.4 still is the current version for MacOS.
                      I appoligize for looking hard enough or posting the version I am using earlier.
                      Thank you for your efforts any way! Please keep it up. If there should be anything I can do with my limited knowledge to assist the further port to MacOS, please let me know.

                      Vinai

                       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.