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.

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

作者
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/