Shortcuts with complex non western keyboard layout

in the shortcut editing window there is the ability to assign shortcuts with western layout like: ctrl+b = strong emphasis
sometimes when i write with Arabic layout i want to use the equivalent of ctrl+b which is ctrl+ﻻ but i did not find that option in the shortcuts editing window?
i don’t want to change the layout every time to English than i apply the shortcut and i change the layout again to Arabic.

OS: Manjaro
save format: odt
LO: Version: 24.2.2.2 (X86_64) / LibreOffice Community
Build ID: 420(Build:2)
CPU threads: 4; OS: Linux 6.9; UI render: default; VCL: kf6 (cairo+wayland)
Locale: ar-DZ (en_US.UTF-8); UI: en-US
24.2.2-3
Calc: threaded

This may be “only” a UI issue.

Technically (I mean at hardware level), a keyboard tells key no. 99 has been pressed. This key press number (raw key code) is sent to the OS which knows the kind of keyboard (because you declared the keyboard in the configuration) and uses a table to map this code to a character, taking into account the simultaneous press on modifiers (Shift, Ctrl, …).

It is likely that LO does some reverse lookup from the Western language configured in Tools>Options, Languages & Locale>General to present a list of “engravings” in the dialog.

Look on which key your Arabic character is engraved and mentally associate it with the Western character on the same physical key. Pay attention there are many “Western” keyboard layouts (QWERTY, AZERTY, QWERTZ, DVORAK, …). If I remember right, you are located in Algeria. Your “natural” Western keyboard is probably AZERTY. Try and check.

1 Like

the button of b in english is provies ﻻ in Arabic but when i try ctrl+b the shortcut works and with ctrl+ﻻ it does not work

If you’re under Linux, I can help you with this issue. Otherwise, no luck: I have very little experience with Windows and with recent releases, I prefer to keep far away for manipulating this OS. It turns unstable too easily.

the only OS i use is: Manjaro Linux.

First thing to check is whether the key code is the same for B and the Arabic key.

  1. launch a command line session:
    1. press Ctrl+Alt+F3
      I suggest F3 but it can be any from F1 to F6 because I don’t know which virtual console GNOME (assuming this is your desktop) uses for graphical session under Manjaro. When you switch to an available virtual console you should read “Manjaro Linux …” and “your_computer_name login:” on another line.
    2. type your user name; when “Password:” appears, enter it
      Your command line session is now active
    3. type showkey Enter
    4. within 10 seconds, press any key and the utility tells you the key code
      Do this for the keys you want to know the key code (Western and Arabic)
    5. wait for at least 10 seconds for the utility to quit
    6. type logout Enter to terminate the command line session
  2. return to your graphical session
    Press Ctrl+Alt+F1 or +F2 or +F6 to return to your graphical session (the exact function key depends on desktop manager and whether Wayland is installed or not. If you don’t return to your graphical session, try other function keys.

There is a possibility to get keycodes in the graphical session if you aren’t running Wayland, i.e. if your distro didn’t upgrade to it (or if is a bit old). You must first install xev package. Then in a terminal window, enter xev Enter and press keys.
The returned keycodes are offset by 8 compared to showkey and this is normal.

This will allow you to check if the Western and Arabic key codes are the same.

1 Like

i cannot change the keyboard layout with my current key combination
i used this: “$ find /usr/share/kbd/keymaps -exec zgrep -l ‘AltGr_Lock’ ‘{}’ ‘;’” but it tells me: no such file.
https://wiki.archlinux.org/title/Linux_console/Keyboard_configuration