Dollar sign unavailable on my keyboard

Have Norwegian keyboard on old MacbPro, it shows ¤ instead of dollar sign.
How to add input language to fix this? Necessary in Bash learning course (book).
Inxi: 2core i5. Shell Zsh. 5.15.57-2 x86_64. Set English UK as default, but it didn`t help.

I don’t know how to change your keyboard, but as a workaround for your learning course you can do any ASCII Character by pressing ctrl + shift + u then let go of them and type the unicode for the character and hit enter. The unicode for $ is 0024.

So where you want it when you want the $, at the same time ctrl + shift + u then release and a u will appear, after this immediately type 0024 and then enter. This will turn the u0024 into a $ and you can continue.

If you are needing it alot, another time saver would be doing this once highlighting the $ in the terminal and copying it, then pasting with ctrl + shift + v whenever needed.

If you add the shift-key, do you get $.

Which desktop are you using?

| Level | Modifier        | Keys Produced                                                  |
| 1     | None            | Lowercase letters & numbers                                    |
| 2     | Shift           | Uppercase letters & symbols on keyboard                        |
| 3     | Define or AltGr | Symbols not on the keyboard & some dead keys                   |
| 4     | 3rd lvl + Shift | More symbols & dead keys (AltGr-Shift-Key)                     |

archlinux keyboard input wiki has a nifty command that parses the output from xev to show the keycodes.

This is frustrating.
I use the compose key set to my Right Alt key…
So if I type ‘Alt 1 2’ I get ½, I can do /c = ¢ and /s = … nothing.
So it’s a matter of looking it up, or using Unicode as Lord_Phan points out… Dollar sign unavailable on my keyboard - #2 by Lord_Phan

I actually keep a list of ones that I commonly use, like ‘degrees’ is just oo = ° .

There’s some methodology which would allow you to enter ‘/’ and ‘S’ or maybe ‘//’ and ‘S’ to get it…

1 Like

Thx for quick answers. Thx especially to Lord_Phan for Unicode 0024 solution.
By luck I found a third solution, maybe. (Not sure when) I got choice between Wayland & X11, I chose X11. Then on startup a screen keyboard with dollar sign & other special signs came up as an alternative to the physical keyboard. Have been looking for it without luck in Settings (which is difficult to find things in, BTW) etc. Input language maybe(?). I guess a good solution is check which Unicode number gives each special sign I`ll need. Today I just skipped the part needing the dollar sign, and learned other stuff. Cos I been through that bit once before. I can live with the Unicode solution. Cos of æ ø å some keys are gone.

Thx for link to instructions on setting up 3rd key and Compose key, which maybe fix it OK.
Now I want to try take it to next level, maybe close to impossible, but I wanna try at least. How to change (the useless) ¤ to $ ? But (HOORAY!) Compose key gave $ as you can see.
On the rest of special keys Ive lost: I guess other combinations give them, or Unicodes do. But I see getting ¤ instead of $ using the (standard) Shift key as a weakness in Macbook keyboards in Norwegian. I believe theres a terminal (script)command to change ¤ to $(?).
If it destroys the setup, no big deal; that`s my main way of learning;+ reset from usb is fast.

Besides the instructions others have given, you might also find it useful to install a little kde program called kCharSelect, I find it handy for the occasional times I need a none-keyboard character because I always forget the key sequences and codes :laughing:.

1 Like
❯ cat /usr/share/X11/locale/en_US.UTF-8/Compose | rg dollar
<dead_currency> <S>			: "$"	dollar # DOLLAR SIGN

What you must do is <compose> <dead_currency> <S>
But I don’t know where the ‘dead_currency’ key is…

So, open your terminal and touch ~/.XCompose
then edit…

Copy and paste:

# ~/.XCompose
# This file defines custom Compose sequences for Unicode characters

# Import default rules from the system Compose file:
include "/usr/share/X11/locale/en_US.UTF-8/Compose"

# Personal compose key strokes:
<Multi_key> <b>  <b> : "฿" UOE3F 
<Multi_key> <s> <s> : "$" U0024

From this file you can also see that there are many other examples in /usr/share/X11/locale too - and for every locale there you can read the code for any character and paste it in your personal ones.

So now I can easily do $5=฿180.61

So mark it solved :wink: We’re done here.

Thx ydar for that one. All set now, again. Right Alt & Shift for $, tilde, backslash etc from kCharSelect is enough for me, cos I need to focus on Bash not ´rabbit holes´ to accomplish

I think your solution may be fastest, as well as a good thing to learn anyway.
I will set me as ignorant to this thread, cos did not find any button called “solved”.
Maybe that is the “solved” button, really. ¤ can maybe be used for something (much) later…