Skip to content

Commit aafd126

Browse files
committed
force scroll wheel
1 parent d3952d3 commit aafd126

File tree

4 files changed

+27
-430
lines changed

4 files changed

+27
-430
lines changed

README.md

+4-13
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,18 @@ Some useful hotkeys for [Balatro](https://store.steampowered.com/app/2379780/Bal
44
## Hotkeys
55
| Key | Use |
66
| :-: | -------------------------------- |
7-
| `F` | Select cards with the same suit. |
8-
| `D` | Select full houses, four of a kinds etc. |
9-
| `S` | Invert selected cards. Tries to select "most discardable" cards. |
7+
| `F`, `Scroll Down` | Select cards with the same suit. |
8+
| `D`, `Scroll Up` | Select full houses, four of a kinds etc. |
9+
| `S`, `Middle Mouse Button` | Invert selected cards. Tries to select "most discardable" cards. |
1010

1111
Pressing the hotkeys multiple times cycles through the options. There are also `Play Hand` and `Discard Hand` hotkeys which are unbound. Follow [configuration](#configuration) to set them.
1212
## Installation
1313
Download the `FlushHotkeys.lua` file and then follow [balamod](https://github.com/balamod/balamod?tab=readme-ov-file#how-to-install-mods) or [steamodloader](https://github.com/Steamopollys/Steamodded?tab=readme-ov-file#how-to-install-a-mod) instructions.
1414

15-
## Scroll Wheel Mode
16-
Use the `FlushHotkeys-scrollwheel.lua` file to enable using scroll wheel. This will **disable all other functionality** for the scroll wheel and isn't supported on balamod. It's fine for the base game but it will override any other scroll wheel feature added by other mods.
17-
18-
| Key | Use |
19-
| :-: | -------------------------------- |
20-
| `Scroll Down` | Select cards with the same suit. |
21-
| `Scroll Up` | Select full houses, four of a kinds etc. |
22-
| `Middle Mouse Button` | Invert selected cards. Tries to select "most discardable" cards.|
23-
2415
## Configuration
2516
If you want to, for example add additional hotkey `Q` for the flushes, open the `FlushHotkeys.lua` file with notepad and change the
2617
```lua
27-
local flush_hotkeys = {"f", "none"}
18+
local flush_hotkeys = {"f", "scrollup"}
2819
```
2920
line into:
3021
```lua

balamod/FlushHotkeys.lua

+10-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
local flush_hotkeys = { "f", "none" }
2-
local pair_hotkeys = { "d", "none" }
3-
local invert_selection_hotkeys = { "s", "none" }
1+
local flush_hotkeys = { "f", "scrolldown" }
2+
local pair_hotkeys = { "d", "scrollup" }
3+
local invert_selection_hotkeys = { "s", "mouse3" }
44
local play_hand_hotkeys = { "none", "none" }
55
local discard_hand_hotkeys = { "none", "none" }
66

@@ -392,6 +392,13 @@ table.insert(mods,
392392
handle_hotkeys(string.format("mouse%i", mbutton)
393393
)
394394
end
395+
end,
396+
on_mousewheel = function(x, y)
397+
if y > 0 then
398+
handle_hotkeys("scrollup")
399+
else
400+
handle_hotkeys("scrolldown")
401+
end
395402
end
396403
}
397404
)

0 commit comments

Comments
 (0)