Author Topic: Entering a backslash on a japanese keyboard on MacOS  (Read 231 times)

greggman

  • Senior Community Member
  • Posts: 275
  • Hero Points: 14
Entering a backslash on a japanese keyboard on MacOS
« on: January 02, 2019, 04:42:55 am »
Sorry for the obscure issue but I can't figure out how to get Slickedit (SlickEdit Pro 2018 (v23.0.0.11)) to let me enter a backslash character on MacOS when using a Japanese keyboard.

Note that this is a known issue in general. A Japanese keyboard doesn't have a backslash key but it has a yen key which occupies the same codepoint in Shift-JIS left over from the 80s.

In any case the OS itself has options for this



As does the Google Japanese IME



But Slickedit is apparently going lower-level than these and so is still inserting the yen symbol unlike all the other apps.

Of course it would be great if you could fix this inside slickedit but is there some simple workaround I could use like some how going into the key bindings and assign ¥ to insert \?   There doesn't appear to be a way to do that in the keybindings UI but maybe a short script or something? As it is I end up having to type a / in the terminal and copy and paste into slickedit which is making it pretty hard to edit code 😅
« Last Edit: January 02, 2019, 04:48:13 am by greggman »

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2555
  • Hero Points: 380
Re: Entering a backslash on a japanese keyboard on MacOS
« Reply #1 on: January 02, 2019, 05:25:31 pm »
One technique would be to record a macro that does Edit > Insert Literal... > 92, and save the macro named something like "insert_backslash" and bind that to a key of your choice.

greggman

  • Senior Community Member
  • Posts: 275
  • Hero Points: 14
Re: Entering a backslash on a japanese keyboard on MacOS
« Reply #2 on: January 03, 2019, 01:14:37 am »
Thanks. That helps a little

Unfortunately it doesn't work when typing in the regular expression form where backslash is pretty important.

I wonder if there is something else I can do at an OS level

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 4587
  • Hero Points: 357
Re: Entering a backslash on a japanese keyboard on MacOS
« Reply #3 on: January 05, 2019, 07:23:42 pm »
Here's a macro to insert a backslash that will work in a text box or combo box (although it might not work in the open/save as dialog).
Code: [Select]
_command void insert_backslash() name_info(','VSARG2_MARK|VSARG2_REQUIRES_EDITORCTL|VSARG2_TEXT_BOX)
{
   keyin("\x5c");
}

Seems like we should be able to fix SlickEdit so this works like it's supposed to with a Japanese keyboard. I'll take a look.