Insert Non-breaking Space

In legal, we use the non-breaking space feature in Word a lot (Ctrl+Shift+Spacebar).  Anybody figured out a hack to use this in GDocs?

Solved Solved
1 42 13K
3 ACCEPTED SOLUTIONS

Look at the very end of your Downloads folder! The folder is called "MSKLC" too. It has a "modified" datestamp of 1st October 2020.

You can just start typing "msklc" in the Downloads folder and it should show you the folder.

Farran_0-1689246895052.png

Open the folder and run setup.exe to install it:)

Creating the layout

1. Once it's installed and you've opened the program, go to File → Load existing keyboard...

Farran_1-1689247092477.png

2. Select your keyboard layout. I'm assuming you're using the US layout but choose accordingly. 

Farran_2-1689247142126.png

3. Click on the spacebar in the layout view.

Farran_3-1689247222179.png

4. A window will appear, titled "VK_SPACE". If the 'Advanced View' checkbox isn't marked, tick it to open the advanced view. The box near the bottom, labelled "shift+ctrl+<Key>" is where you're gonna put the nbsp character.

Farran_5-1689247341024.png

5. Paste this:   U+00a0   into the box, like so, then press OK.

Farran_6-1689247526430.png

6. To check that the non-breaking space character saved properly, tick the Shift and Ctrl boxes in the left-hand panel. They toggle different states of the keyboard, and will show what each key does in that state. Hover your mouse cursor over the spacebar and it should show a popup that reads "U+00A0 NO-BREAK SPACE", like so:

Farran_7-1689247626124.png

7. Click the Project menu and open Properties.

Farran_8-1689249012472.png

8. Name your layout, and give it a description.

8a) The name has to be 8 characters max, and I recommend including "01" so that you can create additional versions if there is a problem or if you decide to add more custom characters to your keyboard. (If you like customization, it can get addictive!)

Farran_9-1689249192637.png

8b) The description is what you'll see in the popup menu when you cycle through keyboard layouts with Win+Space (or whatever your shortcut is set to).

Farran_10-1689249277561.png

9. Test the keyboard layout. Go to Project → Test Keyboard Layout.

Farran_11-1689249428923.png

9a) Type lots of 'm's (because they're the widest character) until they overflow one line.

Farran_12-1689249468686.png

9b) Use Ctrl+Shift+Space to insert a non-breaking space near the end of the row of 'm's. You should find that the row does not break:)

Farran_13-1689249530731.png

10. Project → Validate Layout. As long as you haven't done anything else, you should be greeted with this successful verification message:

Farran_14-1689249626705.png

11. Project → Build DLL and Setup Package. This will create the keyboard layout file and the installer for it.

Farran_16-1689249702297.png

Click yes to open the folder where it saved the setup files.

Farran_15-1689249681366.png

Installing the layout

12. Run setup.exe. Windows will ask you for administrator privileges in the fullscreen user account control thing that Windows does.

Farran_17-1689249811960.png

13. The installer will just install the keyboard layout immediately. Hopefully it succeeded!

Farran_18-1689249916135.png

14. Open the language settings in Windows settings. (You can just type "language" in the Start menu search.) Click on Keyboard.

Farran_21-1689250231035.png

15. You should see the "Override for default input method" section at the top. From the drop-down menu, choose your new keyboard layout.

Farran_22-1689250300545.png

16. The new layout will probably not appear at the top of the list, so we need to select the layout that we want to be the primary layout.

 

Farran_24-1689250350792.png

(As you can see from my list, my custom layout is at the top. I did some hacky stuff a couple of years ago to achieve this and I honestly can't remember how, but it definitely involved tweaking the registry. I don't recommend that at all. I think that just setting it as the override in this settings panel should be fine.)

17. Finally, you probably have to log out and in again, or perhaps even reboot.

You may need to fiddle with Windows's settings a bunch of times before it will stick.

________________________________________

Honestly, Windows's handling of custom keyboard layouts is a nightmare. If you need to uninstall it, that can sometimes be a headache too.

I'll try to outline the steps here...

Uninstallating the layout 

1. Run the setup.exe file again, and choose "Remove the keyboard layout." Then click Finish. Seems simple enough, and sometimes that does the trick!

Farran_25-1689250844785.png

If that, for some reason, didn't work, you'll have to go another route. 

2. Open Programs and Features in the traditional Control Panel. You can get to it quickly by pasting this address into the address bar of a file explorer window: 

Control Panel\All Control Panel Items\Programs and Features

3. Sort the list by the "Installed On" column to show the most recent at the top. If the keyboard layout really hasn't uninstalled, you will see it at the top of the list. 
(Please excuse the appearance of this screenshot, Windows's dark mode is buggy.)

Farran_26-1689251103469.png

4. Click Uninstall at the top of the list. That should be all there is to it.

The reason that I strongly recommend including a version number in the layout name is because sometimes the layout uninstaller leaves remnants in the registry. Installing future versions of a layout with the same name is often impossible, even if you have uninstalled the previous layout completely. I had to trawl though my registry to clean out all traces of the original layout name. Like I said, Windows does not handle custom keyboard layouts well, at all!

 

Ok I hope that guide is detailed enough! 

Let me know if there's any other issues. There doesn't seem to be much information or guidance on the web about how to use this application. I guess that not many people in the world really care about custom keyboard layouts:)

View solution in original post

Oh.  My.  Gawd!  This worked!  I can now use Ctrl+Shift+Space after installing the keyboard.  I just tried it on the following text at the end of a line - "Exhibit A" between the "t" and the "A" and it pulled everything to the next row; keeping Exhibit A from separating!

Where do I send flowers?  Chocolate?  Wine?

My wish has been satisfied.  I am accepting your solution, Farran!

View solution in original post

Ah I'm so glad it worked! And happy that I could help you with this 🙂 

I'm living in Viet Nam so sending anything here would be rather complicated 😅 I'll just enjoy the feeling of being useful. This is the first time that my keyboard customization knowledge has been useful for someone else! 

By the way, if you need this on multiple computers, you should be able to simply install the same layout on each of them – as long as they're using the same layout as the original one on your computer.

Happy lawing! 

 

View solution in original post

42 REPLIES 42

Ah I'm so glad it worked! And happy that I could help you with this 🙂 

I'm living in Viet Nam so sending anything here would be rather complicated 😅 I'll just enjoy the feeling of being useful. This is the first time that my keyboard customization knowledge has been useful for someone else! 

By the way, if you need this on multiple computers, you should be able to simply install the same layout on each of them – as long as they're using the same layout as the original one on your computer.

Happy lawing! 

 

It really is gratifying when someone uses a solution, isn't it?  Especially a rather involved one like you sent.  But your instructions were amazing and I am really happy with the result.  Good idea using it for my home computer as well; since I mostly use GDrive these days rather than MS Office at home.  Take care! S

This is great! Thanks.

Unfortunately, I don't use Windows (I'm using a Chromebook), but this led me to retry inserting a special character. It works! I've been trying to do this for 10 years, so I'm sure this is a new behavior. Previously, inserting a no-break space resulted in a regular space. (At least that's what I'm telling myself.)

I still cannot copy-and-paste a no-break space from outside a google doc into a google doc (or maybe I can't paste a no-break space anywhere else), but I can copy-and-paste a no-break space within a google doc or between google docs. (Maybe this is a security feature.)

Now spaces will return between section symbols and the section number!

I also learned that I can remap the keyboard in a Chromebook by writing my own web extension. I'm unlikely to do that. I'm good with scripts in Google docs, so maybe I can write a script.

Thanks again for your help.