Manjaro KDE on Macbook Pro - how to type special characters?

I installed Manjaro KDE on an old Macbook Pro 12.1 (Yosemite).

It’s my first time working with Linux on a Mac, and while installation went fine and seems to work well, I’m not able to determine how to type special characters?

output of localectl status:

System Locale: LANG=en_US.UTF-8
    VC Keymap: no
   X11 Layout: no
  X11 Variant: mac

On installation I chose the keyboard layout closest to what I think I have: Apple Macbook/Macbook Pro, Norwegian. The upper left key below esc is actually key marked with § and ', while it returns § and |, otherwise it seems to work as intended.

In System Settings > Virtual Keyboard there is an entry marked “None”, while I do have libfakekey and qt5-virtualkeyboard installed. Otherwise the installation is “Vanilla”, all packages are from official repos and none from AUR. The only tweak I made so far was replacing the horrible start menu with the excellent Legacy Application Launcher

Both Command buttons opens the start menu and seems to work like the Meta key on windows-like layouts.

Thankful for any input on how to achieve special characters like ¡@£$½¥{[]}±´¬¿°»«÷⅝‰¼³²¹ and so on.

EDIT: Solved by installing Onboard and switching from Wayland session to X11

I’m on a macbook with English International keyboard. Out of habit I always use virtual keyboards and Onboard runs on all my machines as startup app, appearing minimised on the panel or as a floating icon.
Very customisable and click-and-hold opens a menu that provides all characters needed.

Thanks! But…

Testing Onboard, while looking nice, it closes / crashes as soon as I click any letter.

Testing with my newer HP laptop (“windows” keyboard, also Manjaro KDE) it works like a charm.

On the Macbook, there are some keyboard shortcuts (from the physical keyboard) that only works in certain contiditons. If the desktop is “active”, F12 will not open yakuake - I also tried with guake which I like better, same problem. The shortcut is working when Firefox is active, but not when using LibreOffice. I guess I’ll start separate threads for those issues, but can it be my hardware is too old for Manjaro? How old are your macs?

Old? Mine’s a 5,4 from 2009 :grinning: but I’m on XFCE minimal and I keep things as simple as possible. Anyway, yes, onboard can be a little laggy on older hardware (something to do with the underlying python, I believe) and KDE is a tricky desktop; as minimal install it can be very light but it offers many ways to add eye candy which can drive needed resources up and stress especially the graphics of older hardware. Have a look at desktop settings like animations, shadows, transparencies etc and try reducing startup apps, panel items and open browser windows too.

Should your mbp have an nvidia card running the open source nouveaux drivers this may well be the underlying issue here.
To provide more info of your system please post the output of:
inxi -Fazy

To analyze the crash try starting onboard by typing in a terminal:
then try to replicate the error and post the terminal output here or on Bugs : Onboard .

To get F12 on a Mac keyboard try Fn Ctrl-Opt-F12

Hmm. I decided to start all over, this time with the KDE minimal install. A few things I noted:

  1. During install I chose and tested the keyboard as “Apple laptop”, Norwegian Macintosh Layout.
  2. After install is completed and I have done sudo pacman -Syyu or Pamac (GUI) > Settings > Refresh Databases (yes, I tried both), there are 2 places to check keyboard settings: System Settings > Keyboard, where it says my keyboard hardware keyboard model is “Generic 104-key PC”, and through Manjaro Settings Manager > Keyboard settings where it says my keyboard is “Generic 105-key PC default model” with language settings "English (US) Default).
  3. None of these can possibly be correct as I actually have a 79-key Mac keyboard set to Norwegian layout (æ, ø, å are all in the right place). Oh well.
  Kernel: 6.1.44-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 13.2.1
    parameters: BOOT_IMAGE=/boot/vmlinuz-6.1-x86_64
    root=UUID=2e5403ff-5860-4071-ac8a-bc26ce317616 rw quiet splash
    resume=UUID=a6c5d326-46c8-4032-bca7-e9d781aa32d5 udev.log_priority=3
  Desktop: KDE Plasma v: 5.27.7 tk: Qt v: 5.15.10 wm: kwin_wayland vt: 1
    dm: SDDM Distro: Manjaro Linux base: Arch Linux
  Type: Laptop System: Apple product: MacBookPro12,1 v: 1.0
    serial: <superuser required> Chassis: type: 9 v: Mac-E43C1C25D4880AD6
    serial: <superuser required>
  Mobo: Apple model: Mac-E43C1C25D4880AD6 v: MacBookPro12,1
    serial: <superuser required> UEFI: Apple v: MBP121.88Z.0167.B14.1509281135
    date: 09/28/2015
  ID-1: BAT0 charge: 47.8 Wh (65.7%) condition: 72.8/74.8 Wh (97.3%)
    volts: 11.8 min: 11.4 model: DP bq20z451 type: Li-ion serial: N/A
    status: discharging cycles: 67
  Info: model: Intel Core i5-5287U bits: 64 type: MT MCP arch: Broadwell
    gen: core 5 level: v3 note: check built: 2015-18 process: Intel 14nm
    family: 6 model-id: 0x3D (61) stepping: 4 microcode: 0x2F
  Topology: cpus: 1x cores: 2 tpc: 2 threads: 4 smt: enabled cache:
    L1: 128 KiB desc: d-2x32 KiB; i-2x32 KiB L2: 512 KiB desc: 2x256 KiB
    L3: 3 MiB desc: 1x3 MiB
  Speed (MHz): avg: 1800 high: 3300 min/max: 500/3300 scaling:
    driver: intel_cpufreq governor: schedutil cores: 1: 2902 2: 500 3: 500
    4: 3300 bogomips: 23210
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Type: gather_data_sampling status: Not affected
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT
  Type: mds mitigation: Clear CPU buffers; SMT vulnerable
  Type: meltdown mitigation: PTI
  Type: mmio_stale_data status: Unknown: No mitigations
  Type: retbleed status: Not affected
  Type: spec_rstack_overflow status: Not affected
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
  Type: spectre_v2 mitigation: Retpolines, IBPB: conditional, IBRS_FW,
    STIBP: conditional, RSB filling, PBRSB-eIBRS: Not affected
  Type: srbds mitigation: Microcode
  Type: tsx_async_abort status: Not affected
  Device-1: Intel Iris Graphics 6100 vendor: Apple driver: i915 v: kernel
    arch: Gen-8 process: Intel 14nm built: 2014-15 ports: active: eDP-1
    empty: DP-1, DP-2, HDMI-A-1, HDMI-A-2 bus-ID: 00:02.0 chip-ID: 8086:162b
    class-ID: 0300
  Display: wayland server: v: with: Xwayland v: 23.1.2
    compositor: kwin_wayland driver: X: loaded: modesetting alternate: fbdev,vesa
    dri: iris gpu: i915 display-ID: 0
  Monitor-1: eDP-1 res: 2048x1280 size: N/A modes: N/A
  API: OpenGL v: 4.6 Mesa 23.1.5 renderer: Mesa Intel Iris Graphics 6100
    (BDW GT3) direct-render: Yes
  Device-1: Intel Broadwell-U Audio vendor: Apple driver: snd_hda_intel
    v: kernel bus-ID: 00:03.0 chip-ID: 8086:160c class-ID: 0403
  Device-2: Intel Wildcat Point-LP High Definition Audio
    driver: snd_hda_intel v: kernel bus-ID: 00:1b.0 chip-ID: 8086:9ca0
    class-ID: 0403
  Device-3: Broadcom 720p FaceTime HD Camera driver: N/A pcie: gen: 2
    speed: 5 GT/s lanes: 1 bus-ID: 02:00.0 chip-ID: 14e4:1570 class-ID: 0480
  API: ALSA v: k6.1.44-1-MANJARO status: kernel-api with: aoss
    type: oss-emulator tools: alsactl,alsamixer,amixer
  Server-1: JACK v: 1.9.22 status: off tools: N/A
  Server-2: PipeWire v: 0.3.77 status: off with: wireplumber status: active
    tools: pw-cli,wpctl
  Server-3: PulseAudio v: 16.1 status: active with: pulseaudio-alsa
    type: plugin tools: pacat,pactl
  Device-1: Broadcom BCM43602 802.11ac Wireless LAN SoC vendor: Apple
    driver: brcmfmac v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1
    bus-ID: 03:00.0 chip-ID: 14e4:43ba class-ID: 0280
  IF: wlp3s0 state: up mac: <filter>
  Device-1: Apple Bluetooth Host Controller driver: btusb,hid-generic,usbhid
    type: USB rev: 2.0 speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 1-3:2
    chip-ID: 05ac:8290 class-ID: fe01
  Report: rfkill ID: hci0 rfk-id: 0 state: up address: see --recommends
  Local Storage: total: 465.92 GiB used: 8.27 GiB (1.8%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/sda maj-min: 8:0 vendor: Apple model: SSD SM0512G
    size: 465.92 GiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
    tech: SSD serial: <filter> fw-rev: SA0Q scheme: GPT
  ID-1: / raw-size: 456.82 GiB size: 448.58 GiB (98.20%) used: 8.27 GiB (1.8%)
    fs: ext4 dev: /dev/sda2 maj-min: 8:2
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 288 KiB (0.1%) fs: vfat dev: /dev/sda1 maj-min: 8:1
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default)
  ID-1: swap-1 type: partition size: 8.8 GiB used: 0 KiB (0.0%) priority: -2
    dev: /dev/sda3 maj-min: 8:3
  System Temperatures: cpu: 53.0 C pch: 52.5 C mobo: N/A
  Fan Speeds (RPM): N/A
  Processes: 185 Uptime: 28m wakeups: 2 Memory: total: 8 GiB
  available: 7.66 GiB used: 3.73 GiB (48.6%) Init: systemd v: 253
  default: graphical tool: systemctl Compilers: gcc: 13.2.1 clang: 15.0.7
  Packages: pm: pacman pkgs: 1081 libs: 331 tools: pamac Shell: Zsh v: 5.9
  default: Bash v: 5.1.16 running-in: konsole inxi: 3.3.28
09:57:33.528 WARNING Onboard.XInput: Failed to create osk.Devices: not an X display
09:57:33.529 WARNING TouchInput: XInput event source failed to initialize, falling back to GTK.
09:57:33.529 WARNING Onboard.Keyboard: XInput click simulator CSFloatingSlave unavailable, falling back to CSB
09:57:33.565 WARNING TouchInput: XInput event source failed to initialize, falling back to GTK.

(onboard:3030): Gtk-CRITICAL **: 09:57:33.566: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)'
09:57:34.172 WARNING TouchInput: XInput event source failed to initialize, falling back to GTK.
09:57:34.172 WARNING Onboard.Keyboard: XInput click simulator CSFloatingSlave unavailable, falling back to CSB
zsh: segmentation fault (core dumped) onboard

This seems to work like Ctrl-F12 would on my other PC, opening a new terminal (black screen with blinking cursor top left). Ctrl-F1 brings me back to graphical session.

Maybe I’ll try to replace wayland with X11?

That’s the first thing I’d try since it’s the ‘old’ way (and it works for me). It’s an Intel graphic, shouldn’t give any problems. Everything looks healthy, 8 GB ram is ok.

To set different keyboard mappings (following .)
List the available ones with:
ls /usr/share/kbd/keymaps/mac/all
and set the one you like with:
loadkeys no
If there isn’t a Norwegian keymap search the net for ‘apple mac keymap NO Norwegian Bokmål Norway’, download the file ( eg Norwegian - Keyboard Layout Info ), put it in the /usr/share/kbd/keymaps/mac/all directory and try to load it.
Alternatively, if you have a Win machine around, install Microsoft Keyboard Layout Creator and follow this thread Norwegian Keyboard does not map correctly - Apple Community to create your own file.

Turns out it works for me, too. Goodbye, Wayland :wave:

Running X11 also fixed the shortcut for Guake - I like using Ctrl-Space instead of the default F12, and now it works regardless of which application is active.                                                                     

That returns Couldn't get a file descriptor referring to the console. Trying with loadkeys I get the same message.

I also visited /etc/locale.gen and uncommented the Norwegian and English locales as in your link, after which I did sudo locale-gen and got

Generating locales...
  en_US.UTF-8... done
  nb_NO.UTF-8... done
  en_US.UTF-8... done
  nb_NO.UTF-8... done
Generation complete.

After all this, System Settings > Keyboard Model still shows “Generic 104-key PC”, while Manjaro Settings Manager > Keyboard Settings > Keyboard Model says “Generic 104-key PC Norwegian (Macintosh)”

EDIT: Seems to be close enough for the physical keyboard, that mostly does what it says on them, but I cannot reliably get accents, etc, from Onboard.

Edit 2: When using Onboard I get � instead of the special characters expected. Running from terminal, trying to type the accent only on the key to the left of Backspace (click AltGr then ´) produces ^[´ as output.

1 Like

What do you mean by ‘reliably’? When long-pressing ‘a’ do you get this?

Yes, but see my previous post, last edit. It is those symbols I can not find (which is why I am not shortening “can not”, “I am” etc - can not find the apostrophe :wink:)

And it doesn’t appear when you press ‘shift’ on the onboard?

Indeed it does! Thanks! Starts looking like I can put a “solved” on this thread :smile:

But what’s the AltGr key for then? I can´t do the same things with it as I can on my HP running Manjaro KDE…

Onboard’s default keyboard is the ‘compact’ layout. Open the onboard-settings app or in onboard window right-click bottom right and pick ‘preferences’.
In the settings window pick ‘Layout’ on the left and ‘full keyboard’ on the right to see all options.

Edit: Have a look at this Norwegian keymap text file ‘Alt+gr’ is mentioned under KEYNAME_EXT, maybe you can figure it out:

1 Like

Yeah, did that already as a first after installing Onboard. I still don´t understand how AltGr is supposed to work in onboard, but I’ll check the documentation some other time. Works good enough for now, and as a bonus at some point in this quest the `' key on the physical keyboard started behaving as expected again.

Thanks a lot for your kind help!

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.