User talk:Yair rand/SWKB.js

Add a new section


Some Feedback edit

First off, I want to say that this is a very clever approach to typing. It might take me a while to get used to it, but I think the idea is really good. I guess the main reason I will have to get used to it is because I don't know exactly where the keys are without much of a reference point. I understand that it is based on touch typing, but I don't know if many people know what that is today, unfortunately. That isn't a big deal, however.

I know that Valerie mentioned about separating signs by maybe using the space bar or something like that. Is that possible? Or is that something that you are planning on doing in the future?

My main question is about the copy feature. The directions say to use Control+C, but it doesn't copy for me. I do see a text field appear monumentally with the FSW code, but it doesn't copy. I think it might be because I am on a Mac and the copy command for me is Command+C.

Another thing that I ran into was looking for a specific symbol, S1e111.

M513x514S1e111488x486 I couldn't seem to find it. Am I looking in the wrong place? I toggled the index and thumb and cycled through the handshapes given, but I didn't see it.

And one last comment. I notice that the facial expressions are on both the left and the right. I had done a facial expression with the left and then another with the right for a sign that had two facial expression symbols, which was fine. It wasn't until I wanted to go back and change the one I had done with the left that I ran into a little problem because I had forgotten that I had created it with the left side. I tried to cycle to that symbol with the right side only to find it skipped. I later remembered that it was done with the left side, so I tried it that way. My point is that there are some (most) facial expressions that are both left and right. It could become confusing for the writer to have both options to begin with that is limited depending on which they use to enter the symbol, especially when writing complex signs and forgetting which option was used to begin with. This can also happen with the general movement arrows because it involves both left and right hands equally as well.

M534x526S26504512x474S26514474x474S15050508x495S15058467x495 M538x545S2ff00482x483S14c20515x472S22b03508x510S20500495x534 M539x532S20500495x521S10011518x499S2ff00482x483 (talk) 17:22, 5 September 2014 (UTC)Reply

@Icemandeaf:
  • Re spacebar, the spacebar has been the key that starts a new sign since I first launched the keyboard. Is it not working properly?
  • Re copying: I wasn't aware that Macs didn't use Ctrl-C for copying. I've changed it to also accept Command-C, but I haven't been able to test it to make sure it works.
  • Re S1e111: The key at the outer edge of the bottom row toggles whether fingers are bent in the middle in some way or other. (I think my criteria for what counts as bent might have been a bit inconsistent, unfortunately...) I'm considering getting rid of this system for splitting the handshapes, though; I think it might not be as intuitive as I expected. For now, I've removed the reset of place in the alternates list that occurred when one clicked the key, hopefully making it easier to find any given handshape.
  • Re Accessing non-side-specific symbols: I've changed the script so that facial expressions and two-handed movement arrows can be accessed from either side regardless of which side of the keyboard was used to create the symbol.
--Yair rand (talk) 21:33, 7 September 2014 (UTC)Reply
  • Re spacebar: Well, that is good to know about the spacebar because I didn't know if it would work that way or not. I just tried it and it works.
  • Re copying: I just tried it, and it also works. Thanks.
  • Re S1e111: I wasn't sure if that was a "bent toggle" or if it was just that handshape. Now I know. Thanks.
  • Re Accessing non-side-specific symbols: I just tried it here as well, and it works a little bit more intuitively now.
So here is the sentence that I wrote with you keyboard. I could get used to it. M518x531S30c00482x475S34600482x475S1e111477x503 M518x519S10040492x489S26500493x468S30c00482x425 S38900464x496
Hmm... that last symbol was supposed to be a thin line and a thick line, not two thin lines. It shows up correctly on your keyboard, but not here. When I put the same FSW into SignPuddle, it came up correctly there.
M534x526S26504512x474S26514474x474S15050508x495S15058467x495 M538x545S2ff00482x483S14c20515x472S22b03508x510S20500495x534 M539x532S20500495x521S10011518x499S2ff00482x483 (talk) 21:57, 7 September 2014 (UTC)Reply
Hm, looks like it was getting cut off at the bottom. Punctuation doesn't have the normal box-size position stuff at the beginning. I've changed the script so that punctuation gets positioned so the bottom of the symbol is at the center point (500), which seems to fix it. --Yair rand (talk) 22:39, 7 September 2014 (UTC)Reply

Questions for people who actually know sign language and signwriting edit

  1. Is it likely that sign language translations of the "Delete (right/lefthand) symbol", "Next symbol", "(Left/Middle/Right) Lane", "Fingerspelling mode" and "Autocomplete" would be able to fit in the 50px/50px space on one of the keys?
  2. What do these two symbols mean? Are they related? (More specifically, are they the same thing just on different planes?) M580x510S2ff20452x475S2ff30532x475
  3. I don't understand the limbs symbols, so that area of the keyboard is a bit of a mess right now. Is there any clear way of telling which end is the shoulder (or elbow?) and which is the wrist? Can all (or most?) the limb combinations symbols reasonably be considered rotations of each other?
  4. Are the "Detailed locations" symbols actually used? How about the "headless" facial expressions and the headless arrows? (I'm considering putting these in the currently-unused 5 and 8 keys next to the lane buttons.)
  5. Are there ever situations in a vertical-writing environment where rotated punctuation symbols would be necessary?
  6. Does the current layout of the diagonal arrows make any sense?
  7. Are all these just rotations of the base head, and would it make sense to have them reached by the normal rotation keys? M566x510S2ff02482x475S2ff01530x475S2ff03441x475
  8. I seem to have ran out of keys in the mouths section, while still needing one more for side-specific expressions. Are any of them still similar enough that some could reasonably be merged/be "sub-options" of others?

Thanks. (By the way, fingerspelling mode is working now, but still rather buggy.) --Yair rand (talk) 01:03, 12 September 2014 (UTC)Reply

  1. Hmm... I'll have to look into that. Some might be able to without any problem, while others might have to have something creative done. Somewhat related, Valerie was mentioning to me that having the rotation key with an arrow on top of the symbols is confusing to know what symbol is being used. She felt that it might be good to have only the dynamic symbols or just have an icon to mean rotation. So maybe we should have icons of some sort for the other keys as well. What do you think?
  2. No, they aren't the same. The first is the view above the head with the shoulder line, so that the face is facing straight. The second is the view above the head with the nose facing the diagonal left.
  3. I don't think all of them have obvious meaning to the ends.
  4. The Detailed Location symbols are not really used in everyday writing. They have by used for SignSpelling, but that is only for sorting. At the moment, your keyboard doesn't have any way of typing SignSpelling.
  5. Not that I can think of at the moment.
  6. I can kind of work my way through to find the correct arrows, but I don't know if I know the reasoning behind the placing of the keystrokes.
  7. That is actually a pretty accurate way of looking at it because the left and right ones are the head facing right and left. Even though the middle one isn't actually the head facing backwards, I think that having them accessible via the rotation key might be good.
  8. I'm not sure exactly what you are asking. What symbols do you not have exactly? Because I couldn't find any that I couldn't find.
Very exciting about the fingerspelling mode. Looks good. I didn't really find any bugs, but I didn't use it very much.
M534x526S26504512x474S26514474x474S15050508x495S15058467x495 M538x545S2ff00482x483S14c20515x472S22b03508x510S20500495x534 M539x532S20500495x521S10011518x499S2ff00482x483 (talk) 01:55, 14 September 2014 (UTC)Reply
  1. I've removed the rotating-arrow icon, leaving just the symbol image. I can see how icons in general could be useful, but most of the relevant concepts aren't easily represented. How would one clearly indicate the change of plane with a simple image? Sounds complicated enough not to be worth it.
  2. Hm, in that case I might also need to find a different place for the first one as well.
  3. So they can be used either way? I'm not sure if that makes things simpler or more complicated...
  4. Would "everyday writing" contain all the uses we'd have here on the Incubator? If it's not necessary, I'd rather leave it out. The thing looks confusing enough as it is.
  5. Excellent. That makes things easier, thank you.
  6. There wasn't much reasoning behind them at all, actually. I put the diagonal straight arrows and the "hits floor/wall plane" curved arrows both in the outer-middle-row key because they seemed similar enough.
  7. Good, I've added those symbols. Is there also a floor-plane version of these? Maybe these: M587x510S2ff10422x475S2ff11462x475S2ff12503x475S2ff13551x475 ? (If not what do those symbols mean?)
  8. I'm still missing the side-specific mouths, such as these: M577x510S35620422x475S35720462x475S35820503x475S35610541x475 I'd like to toggle side-specific faces with the same key that's used by the eyes and eyebrow sections, but that's currently occupied by this: M542x510S34700482x475 , so I need to shuffle things around a bit and combine something. --Yair rand (talk) 08:54, 15 September 2014 (UTC)Reply

Centering signs and moving symbols edit

Is there a way to make it so that signs are centered when the spacebar is pressed? Because at the moment, signs aren't centered and can look like they are in the wrong lane. You might need to ask Steve about how that is done.

Also, I was wondering if it is possible to have the keys that move symbols only move one pixel per press and SHIFT+keys move a larger number of pixels -- maybe 10 -- because I have found it difficult to control how long to hold the key down, or not, to move the symbols just to the right place.

M534x526S26504512x474S26514474x474S15050508x495S15058467x495 M538x545S2ff00482x483S14c20515x472S22b03508x510S20500495x534 M539x532S20500495x521S10011518x499S2ff00482x483 (talk) 02:00, 14 September 2014 (UTC)Reply

Re movement: I've slowed down the regular movement speed a bit, which should make precise positioning a bit easier. I'm hesitant to reserve the shift button for faster movement, just in case I might still need it for something else. Additionally, it's impossible for JS to tell which shift button is being pressed, so it wouldn't be one shift key per symbol. If later it looks like there won't be any particular need for the shift keys to be used for something else, I'll set them up to speed up movement by 10x.
Re centering: I didn't actually know things were always supposed to be centered. I see a lot of signs that have the head in the center even though all the other symbols are to one side of it. The same seems to be true for certain body symbols as well, though I'm not sure which ones. Is there some rule set on how to center things? (Also, if the signs are always supposed to be centered, I could just have the script constantly making sure the sign is properly centered.) @Slevinski: Any tips on how to center signs properly? --Yair rand (talk) 09:07, 15 September 2014 (UTC)Reply

Design Issue edit

The information should have been available in draft-slevinski-signwriting-text, but it wasn't. Back in Modern SignWriting: Script Layout, I have the rules defined.

The center of a sign is dependent upon the types of symbols used in the SignBox. If a SignBox does not contain any head or trunk symbols, then the center of a SignBox is the midpoint of the tight bounding box around all of the symbols.
If a SignBox contains head symbols, then the vertical center is the midpoint of the tight bounding box around the head symbols. If a SignBox contains head or trunk symbols, then the horizontal center is the midpoint of the tight bounding box around the head and trunk symbols.

Looking in the ISWA 2010 HTML reference, the heads are all of category 4 with symbol keys S2ff thru S36c. The trunks are half of category 5 with symbol keys S36d thru S375.

A key design issue is that I designed viewers to be simple. The viewers do not need to know the size of the symbols. However, the editors must know the size of the symbols. The editor must be able to compute several tight bounding boxes to determine where the center of the sign is located.

First, a tight bounding box is placed about all of the head symbols. The vertical center of the sign is the midpoint of this tight bounding box. If there are no head symbols, a tight bounding box is placed around all symbols to determine the vertical center.

Second a tight bounding box is placed around all head and trunk symbols. The horizontal center of the sign is the midpoint of this tight bounding box. If there are no head and trunk symbols, a tight bounding box is placed around all symbols to determine the horizontal center.

Once the center of a sign is located, the center of a sign is rewritten with the coordinate 500,500 as the center. These rules make it possible to accommodate both horizontal and vertical writing with the same signs.

The preprocessed maximum coordinate was an efficiency to reduce the size of the data for storage. A previous variant display type ( the expanded form ) would be much easier to use, but would increase the sign names by 30%. The expanded form includes the size definition of every symbol every time it is used in the sign box. Some of my code routines use the expanded string as a transitional form when centering.

A symbol by itself looks like this.

   <svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 15 30" width="15" height="30">
       <medadata>S10000</metadata>
       <g>
           <path d="M13,0l2,0l0,15l-2,0z" class="sym-line" />
           <path d="M0,15l15,0l0,15l-15,0z" class="sym-line" />
           <path d="M2,17l11,0l0,11l-11,0z" fill="#ffffff" class="sym-fill" />
       </g>
   </svg>

The symbol is S10000. If it was expanded, it would be S10000515x530, which means a width of 15 and a height of 30.

When the symbol is used as part of a sign, it would look like this inside of the large SVG.

   <svg x="490" y="480" viewBox="0 0 15 30" width="15" height="30">
       <medadata>S10000</metadata>
       <g>
           <path d="M13,0l2,0l0,15l-2,0z" class="sym-line" />
           <path d="M0,15l15,0l0,15l-15,0z" class="sym-line" />
           <path d="M2,17l11,0l0,11l-11,0z" fill="#ffffff" class="sym-fill" />
       </g>
   </svg>

From this SVG, it is easy to write the spatial symbol in the expanded form: S10000515x530x490x480 which means symbol S10000 with a width of 15 and a height of 30 is used at coordinate 490,480.

A sign with only the above symbol would look like this.

   <svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="490 480 15 30" width="15" height="30" >
       <text font-size="0">M 505x510S10000490x480</text>
       <svg x="490" y="480" ...
   </svg>

In standard Formal SignWriting, every time we move a symbol, we need to recalculate the maximum coordinate.

In expanded Formal SignWriting, we include the size of each symbol every time it's used. The sign above would be MS10000515x530x490x490.

Using the expanded form, we can calculate the center and the preprocessed maximum coordinate. The conversion of the expanded form to standard FSW is destructive. I think it was an over optimization. -Slevinski (talk) 14:54, 15 September 2014 (UTC)Reply

Added centering to the script, thank you for your help. I already had the script pulling up max coordinates by checking the dimensions of the images from SWIS, so that's not much of an issue. (The original purpose was so that symbols would press against the edges nicely, but it works for this as well. :) ) --Yair rand (talk) 21:56, 15 September 2014 (UTC)Reply
Return to the user page of "Yair rand/SWKB.js".