Whitespaces from my keyboard not interpreted in markdown titles - keyboard

The spaces I type with my keyboard are not recognized in my markdown titles in (at least) atom syntax highlighting and some online markdown editors such as commonmark (see example):
I run on ubuntu 16.04 LTS.
Any idea why this is happening ?

I explored a bit my keyboard settings and noticed that my keyboard was configured in French (legacy, alternative).
Although I'm pretty sure this settings was applied by the automatic keyboard layout detection from ubuntu at computer first boot, the term legacy didn't sound right to me. So I just shifted the settings to French and voilà... it just works now.
I guess the keyboard set with French (legacy, alternative) layout mapped the space key to some alternative charater unrecognized by some markdown editors...

Related

Incorrect Keymapping on Pi400

I have loaded the latest version of Raspberry Pi OS (32-bit) to a pi400, but the keymapping is odd. For instance, my backslash '\' Key types the pound sign '#'. Other keys are also mapped oddly too.
I first checked the keyboard-mapping via
sudo raspi-config
and then from the prompt selected Localization Options > Keyboard > Configuring keyboard-configuration
For Keyboard Model, I selected 'Generic 101-key PC' as per this pihut article suggestion.
I saved and rebooted; no luck.
I found a tutorial on remapping keys, but requires some bash scripting to run on start, which seems messy.
Maybe choosing a different Keyboard model in keyboard-configuration would solve the issue instead?
Turns out my locale was set to UK.
I used the following command to change my keyboard region and it fixed the issue
setxkbmap us

Persian (Arabic) Support for Visual Studio Code

Visual Studio Code does not seem to display Persian or Arabic scripts nicely in the terminal window. I can confirm that on Linux, but not sure about macOS or Windows. Instead of displaying right-to-left languages from right to left, it chains characters to each other from left to right. I tried changing its terminal to one with good Persian support like Konsole from the settings, but it didn't work. Is there a way to solve this or do we have to request project maintainers to add the support?
A screen shot is attached to show the problem.
I had the same problems use the package linked below. You can use it to first convert the text and copy that and paste it into the terminal for input. I made it to correctly organize the Arabic characters and display them correctly. The library supports,
Arabic, Farsi, and English characters and symbols.
Check it out.
https://www.npmjs.com/package/rtl-arabic

Bépo keyboard layout has been sabotaged in Ubuntu 17.10

I've been using the Bépo keyboard layout for years in Ubuntu, labelled as "French (Bepo, ergonomic, Dvorak way)".
Since upgrading from Ubuntu 17.04 to 17.10 (Artful Aardvark), I now have to use Ctrl+Shift+V to paste, instead of Ctrl+V. This is unintuitive and I'd like to change it back, but I'm not sure how to revise it. In the system settings, there are keyboard shortcuts for starting the terminal etc, but nothing about sabotaging the effect of buttons such as Ctrl. There are no shortcuts listed for copying or pasting.
I suspect that Ubuntu itself has used a faulty key file, as I recall having a similar problem with Windows a while ago, having to mess around with Microsoft's Keyboard Layout Creator.
In Windows I'd experienced a phenomenon where the right alt key had been implemented as ctrl+alt or something along those lines, so I figured that maybe in Ubuntu, the OS was using an odd combination, capturing a potential combination for something unrelated.
I went into the keyboard settings and disabled lots of various combinations that I don't use; then «paste» is working again! There was nothing with a V, so this seems odd. Maybe there were side-effects happening somewhere along the way.

RTL language with Sublime Text editor

The RTL languages are not supported in the sublime text editor
I tried this plug-in Bidirectional text support
on windows os
Copied all files from the zip Sublime-Text-2-BIDI-master to the ST3 folder and changed the font type and size.
then I copied the unicodedata.pyd to C:\Users\USERNAME\AppData\Roaming\Sublime Text 2\Packages\Bidirectional text support\bidi
now the Tools > Bidirectional text part didn't look gray anymore but it is still disabled.
also I copied these two lines but it didn't work
sys.platform.startswith('win'):
sys.path.append('../../..')
Any help would be appreciated
In order to get Sublime Text to work with Arabic characters using Sublime Text BIDI plugin on Windows correctly, ensure you've done the following:
Copy the plugin folder to the following path C:\Users\USERNAME\AppData\Roaming\Sublime Text 2\Packages\
Copy unicodedata.pyd from ST installation directory to both, the main plugin folder which in your case is Sublime-Text-2-BIDI-master and inside bidi folder.
Set your sublime user-settings to the following:
{
"font-face": "arial",
"font_size": 11,
"default_encoding": "UTF-8",
"fallback_encoding": "Arabic (Windows 1256)"
}
Reload the plugin by viewing rtl.py and saving
In the case that doesn't fix it, you can read what sublime console log outputs when you click on Bidirectional text for a given Arabic text, console log can be accessed through ctrl+~.
Very Easy,
Just follow this Video steps
دعم اللغة العربية في برنامج Sublime
1- Download the Sublime-BIDI-master folder from Github of solution
2- Extract it and paste under \Sublime Text Build (whatever)\Data\Packages(the downloaded folder).
3- open sublime wit any RTL Language file and right click anywhere you'll new options (Bidirectional text) .. Click it :).
However, in my Sublime version (build 3126), Arabic letters will be reshaped when switching to Bidi.
Initially in the range U+0621-U+064A, which are the usual Unicode codes for Arabic letters, characters will be mapped to the range U+FE70-U+FEFC, which are codes for each (isolated, initial, middle, final) Arabic connected forms. These latter codes, called Arabic-Presentation-Forms-B, are deprecated by Unicode and their usage should be very limited.
For example, before switching to Bidi, the word كتب, looks ب ت ك, from left to right U+0643 U+062A U+0628. This is the memory order. (It is up to the final rendering tool to display the string in visual order by connecting letters.)
After Bidi switching in Sublime, the word will appear good as كتب, because the codes are ﺐ ‎U+FE90 followed by ﺘ U+‎FE98 followed by ﻛ U+‎FEDB. In this order. That means, in a Bidi enabled tool like a browser, it will appear ﺐﺘﻛ as the final visual order. This is not what the user expects.
So, not only Bidi switching changes the letters code, it also changes the memory order.
Personal experience.
When editing a source file (HTML and other languages or formats) containing some RTL characters, it is really tricky to navigate in the text edited. So the mode "before" (logical or memory order) might be very helpful than the mode "after" (visual or display order). With logical order, it's useless to join letters, it doesn't make sens.
Check this link, I had the same problem but solved it with the Sublime Text BIDI plugin.
I was still facing an issue because of the editor's font. It will be recommended to use a fixed-width font like Courier New. This should ensure the plug-in works as expected.

Can't write English in xterm terminal

My keyboard has two languages, English and other. But in xterm I can write only in other language, and I can't replace the language in any way (alt-lshift, the regular way, or in the gui). With shift key I can write upper case (with caps lock it doesn’t work).
The Cygwin guides on the internet referrals me to xkb layout files, that doesn't existing in my computer at all.
I open the xterm from the icon of Xwin.
Thank you.
Since this is an XTerm running in the Cygwin X server, the X server is doing all the keyboard input translation, independently from the keyboard translation Windows does for other programs (the X server reads the raw keyboard input from the device). So you have to use the X11 methods of changing keyboard layouts. Into your .xinitrc or .xprofile (I can't remember which one Cygwin uses) put the following command
setxkbmap us
To load the US keyboard layout. You can type it also from your xterm when you need it. Read the manpage of setxbmap for details.

Resources