Skip to content

screen keyboard v2 - data driven layouts! #649

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Aug 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,4 +160,4 @@ A few features in various points in the horizon are:
## Backports?

This mod is only and will only be available for **1.19.4** and above, this is because in 1.19.4, Mojang
introduced arrow key navigation which was easily ported to controller, below 1.19.4, this is not possible.
introduced arrow keyFunction navigation which was easily ported to controller, below 1.19.4, this is not possible.
2 changes: 1 addition & 1 deletion docs/architecture/mod-comparison.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ exhaustive, and there are many more features that are not listed here.**
| **Open source** | ✅ Yes | ✅ Yes | ✅ Yes | ⛔ No |
| **Library used** | SDL 3.x / GLFW | GLFW | SDL 2.x / GLFW | |
| **Custom Screen Compatibility** | Convenient APIs to hook into controller support directly from `Screen` implementation. | No API. Sometimes necessary to mixin into Midnight Controls and edge-case code required. | ⛔ | ⛔ |
| **Screen Navigation** | 4-axis navigation, emulating arrow key navigation with optional cursor emulation | 4-axis navigation, emulating arrow key navigation | Cursor emulation only. | 2-axis tab-key emulation |
| **Screen Navigation** | 4-axis navigation, emulating arrow keyFunction navigation with optional cursor emulation | 4-axis navigation, emulating arrow keyFunction navigation | Cursor emulation only. | 2-axis tab-keyFunction emulation |
| **Controller rumble** | ✅ | ⛔ | ✅ | ⛔ |
| **In-game button guide** | ✅ Extensible by 3rd party mods | Hardcoded buttons and positions | Hardcoded buttons and positions | ⛔ |
| **Input latency** | 20Hz - follows Minecraft's game loop rate | 1000Hz for axes, 20Hz for buttons | Unknown | Unknown |
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/_meta.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"builtin-bindings.mdx": "Built-in bindings",
"builtin-inputs.mdx": "Built-in inputs",
"builtin-controller-namespaces": "Built-in controller namespaces",
"builtin-controller-namespaces.mdx": "Built-in controller namespaces"
}
188 changes: 104 additions & 84 deletions docs/reference/builtin-bindings.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,105 +2,125 @@
title: Built-in Bindings
---

This is a list of all Controlify's built-in bindings.
This is a list of all Controlify's built-in bindings with brief descriptions and availability.
These are the entries on the 'Controls' page of controller settings.

### Movement
- `controlify:walk_forward`
- `controlify:walk_backward`
- `controlify:strafe_left`
- `controlify:strafe_right`
- `controlify:look_up`
- `controlify:look_down`
- `controlify:look_left`
- `controlify:look_right`
- `controlify:gyro_button`
- `controlify:jump`
- `controlify:sprint`
- `controlify:sneak`

| ID | Description | Availability |
|----------------------------|----------------------------|----------------------------------|
| `controlify:walk_forward` | Move forward | |
| `controlify:walk_backward` | Move backward | |
| `controlify:strafe_left` | Strafe left | |
| `controlify:strafe_right` | Strafe right | |
| `controlify:look_up` | Look up | |
| `controlify:look_down` | Look down | |
| `controlify:look_left` | Look left | |
| `controlify:look_right` | Look right | |
| `controlify:gyro_button` | Hold to enable gyro aiming | Requires gyro-capable controller |
| `controlify:jump` | Jump | |
| `controlify:sprint` | Sprint | |
| `controlify:sneak` | Sneak / crouch | |

### Gameplay
- `controlify:attack` (equivalent to left-click)
- `controlify:use` (equivalent to right-click)
- `controlify:drop`
- `controlify:drop_stack`
- `controlify:pause`
- `controlify:change_perspective`
- `controlify:swap_hands`
- `controlify:next_slot` (hotbar)
- `controlify:prev_slot` (hotbar)
- `controlify:hotbar_item_select_radial`
- `controlify:game_mode_switcher`

| ID | Description | Availability |
|----------------------------------------|--------------------------------|--------------|
| `controlify:attack` | Primary action (left-click) | |
| `controlify:use` | Secondary action (right-click) | |
| `controlify:drop` | Drop selected item | |
| `controlify:drop_stack` | Drop entire stack | |
| `controlify:pause` | Pause / open menu | |
| `controlify:change_perspective` | Cycle camera perspective | |
| `controlify:swap_hands` | Swap main/off-hand items | |
| `controlify:next_slot` | Select next hotbar slot | |
| `controlify:prev_slot` | Select previous hotbar slot | |
| `controlify:hotbar_item_select_radial` | Open hotbar selection radial | |
| `controlify:game_mode_switcher` | Open game mode switcher | |

### Inventory
- `controlify:inventory`
- `controlify:inv_select`
- `controlify:inv_quick_move`
- `controlify:inv_take_half`
- `controlify:drop_inventory`
- `controlify:bundle_navi_up`
- `controlify:bundle_navi_down`
- `controlify:bundle_navi_left`
- `controlify:bundle_navi_right`

| ID | Description | Availability |
|-----------------------------|----------------------------|--------------|
| `controlify:inventory` | Open inventory | |
| `controlify:inv_select` | Select slot / pick up item | |
| `controlify:inv_quick_move` | Quick-move (shift-click) | |
| `controlify:inv_take_half` | Take half from stack | |
| `controlify:drop_inventory` | Drop from inventory | |

### Creative
- `controlify:pick_block`
- `controlify:pick_block_nbt`
- `controlify:hotbar_load_radial`
- `controlify:hotbar_save_radial`

| ID | Description | Availability |
|---------------------------------|----------------------------|---------------|
| `controlify:pick_block` | Pick block under crosshair | |
| `controlify:pick_block_nbt` | Pick block with NBT | Creative only |
| `controlify:hotbar_load_radial` | Load saved hotbar radial | Creative only |
| `controlify:hotbar_save_radial` | Save hotbar radial | Creative only |

### Misc
- `controlify:open_chat`
- `controlify:toggle_hud_visibility`
- `controlify:show_player_list`
- `controlify:take_screenshot`
- `controlify:debug_radial`
- `controlify:toggle_debug_menu`
- `controlify:toggle_debug_menu_fps`
- `controlify:toggle_debug_menu_net` (>= 1.20.3 targets only)
- `controlify:toggle_debug_menu_prof` (>= 1.20.3 targets only)
- `controlify:toggle_debug_menu_charts` (< 1.20.3 targets only)

| ID | Description | Availability |
|-------------------------------------|-------------------------------|----------------------|
| `controlify:open_chat` | Open chat | |
| `controlify:toggle_hud_visibility` | Toggle HUD visibility | |
| `controlify:show_player_list` | Show player list | |
| `controlify:take_screenshot` | Take screenshot | |
| `controlify:debug_radial` | Open debug radial | |
| `controlify:toggle_debug_menu` | Toggle debug screen | |
| `controlify:toggle_debug_menu_fps` | Toggle debug (FPS) panel | |
| `controlify:toggle_debug_menu_net` | Toggle debug (Network) panel | 1.20.3+ targets only |
| `controlify:toggle_debug_menu_prof` | Toggle debug (Profiler) panel | 1.20.3+ targets only |

### GUI
- `controlify:gui_press`
- `controlify:gui_back`
- `controlify:gui_next_tab`
- `controlify:gui_prev_tab`
- `controlify:gui_abstract_action_1`
- `controlify:gui_abstract_action_2`
- `controlify:gui_abstract_action_3`
- `controlify:gui_navi_up`
- `controlify:gui_navi_down`
- `controlify:gui_navi_left`
- `controlify:gui_navi_right`
- `controlify:cycle_opt_forward`
- `controlify:cycle_opt_backward`

| ID | Description | Availability |
|---------------------------------------|----------------------------------|--------------|
| `controlify:gui_press` | Activate / press focused control | |
| `controlify:gui_back` | Go back / close | |
| `controlify:gui_next_tab` | Next tab / page | |
| `controlify:gui_prev_tab` | Previous tab / page | |
| `controlify:gui_abstract_action_1` | Context action 1 | |
| `controlify:gui_abstract_action_2` | Context action 2 | |
| `controlify:gui_abstract_action_3` | Context action 3 | |
| `controlify:gui_navi_up` | Navigate focus up | |
| `controlify:gui_navi_down` | Navigate focus down | |
| `controlify:gui_navi_left` | Navigate focus left | |
| `controlify:gui_navi_right` | Navigate focus right | |
| `controlify:gui_secondary_navi_up` | Navigate secondary area up | |
| `controlify:gui_secondary_navi_down` | Navigate secondary area down | |
| `controlify:gui_secondary_navi_left` | Navigate secondary area left | |
| `controlify:gui_secondary_navi_right` | Navigate secondary area right | |

### Radial Menu
- `controlify:radial_menu`
- `controlify:radial_axis_up`
- `controlify:radial_axis_down`
- `controlify:radial_axis_left`
- `controlify:radial_axis_right`

| ID | Description | Availability |
|--------------------------------|-----------------------------|--------------|
| `controlify:radial_menu` | Open the radial menu | |
| `controlify:radial_axis_up` | Select radial segment up | |
| `controlify:radial_axis_down` | Select radial segment down | |
| `controlify:radial_axis_left` | Select radial segment left | |
| `controlify:radial_axis_right` | Select radial segment right | |

### Virtual Mouse
- `controlify:vmouse_move_up`
- `controlify:vmouse_move_down`
- `controlify:vmouse_move_left`
- `controlify:vmouse_move_right`
- `controlify:vmouse_snap_up`
- `controlify:vmouse_snap_down`
- `controlify:vmouse_snap_left`
- `controlify:vmouse_snap_right`
- `controlify:vmouse_lclick`
- `controlify:vmouse_rclick`
- `controlify:vmouse_shift_click`
- `controlify:vmouse_scroll_down`
- `controlify:vmouse_scroll_up`
- `controlify:vmouse_shift`
- `controlify:vmouse_page_next`
- `controlify:vmouse_page_prev`
- `controlify:vmouse_page_down`
- `controlify:vmouse_page_up`
- `controlify:vmouse_toggle`

| ID | Description | Availability |
|---------------------------------|-------------------------------|--------------|
| `controlify:vmouse_move_up` | Move cursor up | |
| `controlify:vmouse_move_down` | Move cursor down | |
| `controlify:vmouse_move_left` | Move cursor left | |
| `controlify:vmouse_move_right` | Move cursor right | |
| `controlify:vmouse_snap_up` | Snap to nearest element up | |
| `controlify:vmouse_snap_down` | Snap to nearest element down | |
| `controlify:vmouse_snap_left` | Snap to nearest element left | |
| `controlify:vmouse_snap_right` | Snap to nearest element right | |
| `controlify:vmouse_lclick` | Left-click | |
| `controlify:vmouse_rclick` | Right-click | |
| `controlify:vmouse_shift_click` | Shift-click | |
| `controlify:vmouse_scroll_down` | Scroll down | |
| `controlify:vmouse_scroll_up` | Scroll up | |
| `controlify:vmouse_shift` | Hold Shift modifier | |
| `controlify:vmouse_page_next` | Page next | |
| `controlify:vmouse_page_prev` | Page previous | |
| `controlify:vmouse_page_down` | Page down | |
| `controlify:vmouse_page_up` | Page up | |
| `controlify:vmouse_toggle` | Toggle virtual mouse | |
3 changes: 2 additions & 1 deletion docs/resource-packs/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
"custom-controller-identification.mdx": "Custom Controller Identification",
"default-binds.mdx": "Default Binds",
"input-glyphs.mdx": "Input Glyphs",
"guides.mdx": "Button Guides"
"guides.mdx": "Button Guides",
"keyboard-layouts.mdx": "Keyboard Layouts"
}
6 changes: 3 additions & 3 deletions docs/resource-packs/guides.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ When the _rule_ applies, it shows the text "Jump" and the glyph for the `control

As well as literal text such as `"Jump"`, Controlify supports the Minecraft
[text component format](https://minecraft.wiki/w/Text_component_format) which allows you to use translations and styling.
For example, you can use `"then": {"translate": "mypack.jump"}` to use a translation key sourced from your pack's language files.
For example, you can use `"then": {"translate": "mypack.jump"}` to use a translation keyFunction sourced from your pack's language files.

A rule can be displayed either on the `left` or `right` side of the screen, this is defined by the `"where"` field.

Expand Down Expand Up @@ -134,10 +134,10 @@ These facts are available in all domains.
| `controlify:in_water` | When the player is touching water. |
| `controlify:under_water` | When the player has their eyes underwater. |
| `controlify:in_lava` | When the player is touching lava. |
| `controlify:sneaking` | When the player is attempting to sneak (pressing the sneak key, or it is toggled on). |
| `controlify:sneaking` | When the player is attempting to sneak (pressing the sneak keyFunction, or it is toggled on). |
| `controlify:is_toggle_sneak` | When the player is using toggle sneak (does not mean it is currently toggled on). |
| `controlify:is_toggle_sprint` | When the player is using toggle sprint (does not mean it is currently toggled on). |
| `controlify:sprinting` | When the player is attempting to sprint (pressing the sprint key, or it is toggled on). |
| `controlify:sprinting` | When the player is attempting to sprint (pressing the sprint keyFunction, or it is toggled on). |
| `controlify:input_moving` | When the player is applying movement input—even if the player is not physically moving, if they're trying to, this fact goes. |
| `controlify:is_spectator` | When the player is in spectator mode. |
| `controlify:is_creative` | When the player is in creative mode. |
Expand Down
Loading