Can't input kaomoji

I can’t input some characters, in particular when I’m trying to put in some kaomoji…

image

if I hit enter here, nothing happens. if I remove the character I called out, then I can enter the card name. btw, I can click away and the card will be saved too.

as in ⊂(◉‿◉)つ
as in ¯_(ツ)_/¯ as in┬─┬ ノ( ゜-゜ノ)`

those are the ones I’ve tried so far

1 Like

this is deliberate, due to an issue inputting japanese characters for native writers.

On japanese keyboards, the enter key is used to switch between katakana and hiragana. So having enter make a new card in that case would break their typing experience. So instead, a check is performed: if the card only contains japanese characters then enter won’t create a new card.

you can save the card by clicking anywhere else. Also, if there are english characters in their too it should work.

Not sure if there’s a better solution?

thanks for the explanation. I’m surprised I haven’t hit this before.

can you clarify what you mean here? I’m typing dunno ¯\_(ツ)_/¯ as the card name, but Enter does not commit the change.

this is the code I’m using to detect whether the string contains japanese (it’s based on unicode character ranges)

  nameContainsJapanese (name) {
    if (!name) { return }
    // https://regexr.com/5n78p
    // matches unicode ranges for hiragana, katana, kanji
    const japanesePattern = new RegExp(/[\u3040-\u309f\u30a0-\u30ff\uff00-\uff9f\u4e00-\u9faf\u3400-\u4dbf]/gmi)
    const japanese = name.match(japanesePattern)
    return Boolean(japanese)
  },

despite characters like / looking like the english /, they’re in fact distinct characters with different code points. So basically, every character in ¯\_(ツ)_/¯ is interpreted as a japanese character

1 Like

That said I could totally add whitelist exceptions for cards that just contain the shrug or a couple common kaomojis, if you think you’ll use them often enough that it’ll be annoying

it’s not a huge deal. I was curious what you meant specifically by “if there are english characters in their too it should work.” from the looks of the code, if you detect any Japanese characters, then you will suppress the Enter :slight_smile:

1 Like

good catch! I just asked the original native Japanese issue poster if switching from suppressing ‘enter’ if there’s ANY :jp: characters to requiring ALL :jp: characters would cause an issue.

1 Like

cool, also (and I have no idea how the japanese keyboard input mechanism works), but what if you detect two (or more) enters in a row to close the card?

I can’t think of a good one, but is there way to indicate to the user why hitting Enter is not working?

1 Like

if I can switch to ALL characters, the enter key should work as intended in these kaomoji cases. According to regexr, not all characters are japanese in the kaomoji cases above

1 Like

reply quoted:

“i’m using english and japanese at once, so i think current specification [any char] is better!”

maybe instead i can show an indicator that the characters are japanese …

that would be nice. it is weird and frustrating when it seems like all-of-a-sudden Enter doesn’t work. I can’t think of a super-elegant way, but this is probably pretty niche so might not need to be elegant.

other thoughts/ideas:

  • it seems like hitting escape is suppressed too. would it be okay to allow that as another way to get out of editing mode?
  • another option I tried was tabbing out of the textarea and then it took me to the checklist button. what if there were an save/enter/post button? that’s a big change, but just vocalizing my thought process.
1 Like

My idea:

The first time in a space when someone tries to hit Enter on an a card with mixed-JP content, you could use a little pop-up message in the bottom corner (the same component as the “Kinopio has been updated” one) to say, “Hey, it looks like you’re using JP characters. Click outside the card to finish typing instead of pressing Enter”

1 Like

I like that idea. I was thinking a message local to the edit card dialog, but the general notification toast thing works better. And I would personally be okay if this happened every time you hit Enter on a card with japanese characters.

you could then implement an easter egg where if you keep hitting enter, you start getting progressively passive aggressive messages (“i told you to click away” “you’re still here huh?” “hit enter again, i dare you”, etc) (͡ ° ͜ʖ ͡ °)

1 Like

I like ‘first time’ instead of ‘every time’ because every would be annoying to deliberately japanese typers.

you could then implement an easter egg where if you keep hitting enter, you start getting progressively passive aggressive messages (“i told you to click away” “you’re still here huh?” “hit enter again, i dare you”, etc) (͡ ° ͜ʖ ͡ °)

lol reminds me of warcraft3

I’m leaning to a card specific indicator though just because it clearly informs (like the one time notification), but is not forgettable and is contextual (which is the issue an every time notification would be addressing).

Not sure of the exact implementation though yet, will work on this soonish

1 Like

oh weird, this might be a bug, will need to investigate

1 Like

what do you think of this

  • JPN button in card appears if name contains japanese input. Clicking it tells you that enter won’t work
    Screen Shot 2021-04-22 at 2.42.22 PM

  • also fixed issue preventing esc from always working

1 Like

nice, I think that works :slight_smile: some comments:

  • maybe the copy can tell the user how to proceed (actionable): "The Enter key is disabled to allow switching between Hiragana and Katakana. Click away or hit Esc to save. "
  • seeing the new button made me wonder: what if upon detection, you put a button next to the text area to the right? kinda like a save button that the user could tab to? then, the user could Tab, Enter to save. dunno if that’s a good idea or worth it for this niche case.

Not sure if this addresses pt1, but the card is continuously saved as you type. There’s no separate save that happens on card close

I could only do that by floating the button over the text area or reducing the width of the text area ?