Skip to content

Commit

Permalink
✨ Add misc keyboard fnState command (#311)
Browse files Browse the repository at this point in the history
Co-authored-by: Yann Bertrand <5855339+yannbertrand@users.noreply.github.com>
  • Loading branch information
hugovandevliert and yannbertrand authored Oct 15, 2023
1 parent efcf613 commit d851eb9
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/.vitepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,10 @@ export default defineConfig({
text: 'Close confirm changes popup',
link: '/misc/nsclosealwaysconfirmschanges.md',
},
{
text: 'Function keys behavior',
link: '/misc/applekeyboardfnstate.md',
},
],
},
],
Expand Down
1 change: 1 addition & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ defaults rename ${domain} ${old_key} ${new_key}
- [Key held down behavior](./misc/applepressandholdenabled.md)
- [Focus Follows Mouse](./misc/focusfollowsmouse.md)
- [Close confirm changes popup](./misc/nsclosealwaysconfirmschanges.md)
- [Function keys behavior](./misc/applekeyboardfnstate.md)

## 🤔 How do I add a command?

Expand Down
54 changes: 54 additions & 0 deletions docs/misc/applekeyboardfnstate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
title: Function keys behavior | Miscellaneous
description: Allows you to change the behavior of the function keys.
head:
- - meta
- property: 'og:title'
content: macOS defaults > Miscellaneous > Function keys behaviour
- - meta
- property: 'og:description'
content: Allows you to change the behavior of the function keys.
---

# Function keys behavior

Allows you to change the behavior of the function keys. The two possible options are:

- Use `F1`, `F2`, etc. as special keys (default)
- Use `F1`, `F2`, etc. as standard function keys

⚠️ A restart of your Mac is required to apply these changes.

<!-- break lists -->

- **Tested on macOS**:
- Sonoma
- **Parameter type**: bool

## Set to `false` (default value)

By default, pressing a function key will perform the special feature printed on that key.

```bash
defaults write NSGlobalDomain com.apple.keyboard.fnState -bool false
```

## Set to `true`

`F1`, `F2`, etc. behave as standard function keys. Press the `fn` key to use the special features printed on the key.

```bash
defaults write NSGlobalDomain com.apple.keyboard.fnState -bool true
```

## Read current value

```bash
defaults read NSGlobalDomain com.apple.keyboard.fnState
```

## Reset to default value

```bash
defaults delete NSGlobalDomain com.apple.keyboard.fnState
```
1 change: 1 addition & 0 deletions docs/misc/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ All the others `defaults` that don't deserve their own category.
- [Key held down behavior](./applepressandholdenabled.md)
- [Focus Follows Mouse](./focusfollowsmouse.md)
- [Close confirm changes popup](./nsclosealwaysconfirmschanges.md)
- [Function keys behavior](./applekeyboardfnstate.md)

0 comments on commit d851eb9

Please sign in to comment.