Google Sheets Enable Scandinavian Keyboard On Mac

Fix shift+option+number keys in Google Sheets on Mac while using a Scandinavian keyboard layout, by interception of shift+option+number keys, and replace them with the correct char pasted in. Flaws: Does not enter edit mode when inserting into inactivated sheet cells.

作者
Flemming Steffensen
今日安裝
0
安裝總數
1
評價
0 0 0
版本
1.3
建立日期
2025-01-01
更新日期
2025-01-03
尺寸
4.0 KB
授權條款
MIT
腳本執行於

Userscript to type missing characters into Google Sheets on mac

This script was started when I wanted to type $ and other shift+option characters into Google Sheets on MacOS with a Danish keyboard.

The problem

It turns out that 7 out of the ten shift+option+digit keys available on the keyboard have been hijacked by Google Sheets for internal shortcuts to add and remove borders to cells. On many keyboard layouts thats not a problem, but for scandinavian keyboard layouts it means that these 7 characters: ¯ ” $ ¢ \ { , simply can not be type into Sheet, and instead must be copy-pasted to be inserted.

This is especially problematic if you type in formulas in Google Sheets, since several of these signs are vital in formulas.

The solusion

I've created a userscript that can be installed in Chrome and other browsers, which will intercept keyboard events on the Google Sheets page. If any of the 10 shift+option+digit keys are pressed, the event is blocked and the proper character is inserted via clipboard.

In Google Sheets, if a cell is in edit mode, a character is insertes exactly as if it was any ordinary key. If the cell is not in edit mode, the behaviour is slightly different to if it was any ordinary key:

  • An ordinary key event would insert the character into a cell, overwriting contents, and leave the cell in edit model, so subsequent key events would be added to the cell.
  • This solusion will insert the character into the cell, overwriting contents, but NOT leave the cell in edit mode, so subsequent key events will overwrite contents.

Usage

Simply install the script in Tampermonkey, and reload your Google Sheets page.

Install Tampermonkey from here: https://www.tampermonkey.net/

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址