Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Menu-item Alt accelerators double-apply styles

Open Beginner friendly
#151 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
kotlin
Domain
desktop

Research direction

Start in StyleMenuBuilder.kt by reading getStyleCategories and the addLoadoutListener filter it interacts with. Remove the per-item Alt accelerators so menu items use accelerator 0; done when the filter is the only Alt+1–8 mechanism applying styles.

Written by the indexing model from the issue text.

Description

Problem

File StyleMenuBuilder.kt — getStyleCategories (lines 90, 130–155) and currentLoadedStyle (lines 331–337)

double-fire bug. getStyleCategories attaches Alt+1–9 accelerators to the first nine menu items whose parent category/subcategory matches the current loadout. When a nested loadout is active, those per-item menu accelerators and the Alt+1–8 Display filter in addLoadoutListener both fire on the same keystroke, applying the style twice.

Fix remove the per-item accelerator logic entirely; every menu item uses accelerator 0. The Alt+1–8 Display filter becomes the single apply mechanism.

// before (relevant excerpt)
var cont = 1
...
id = id.substring(id.lastIndexOf('/') + 1)
val myCurrentLoadout = BBIni.propertyFileManager.getProperty(CURRENT_STYLE_LOADOUT_CATEGORY, "")

//TODO: Re-add shortcut functionality
//puttting shortcut in menu
val tempComp: String = if (myCurrentLoadout.contains("/")) "$cat/$afterCat" else if (afterCat == id) cat else "$cat/$afterCat"
if (myCurrentLoadout == tempComp && cont <= 9) {
    subMenu!!.addItem(
        lhb[style.name], SWT.ALT + '0'.code + cont
    ) { e: BBSelectionData -> onStyleSelect.accept(BBStyleSelection(style, e.widget)) }
    cont++
} else {
    subMenu!!.addItem(
        lhb[style.name], 0
    ) { e: BBSelectionData -> onStyleSelect.accept(BBStyleSelection(style, e.widget)) }
}
// after (relevant excerpt)
val styles = styleDefs.styles
...
// Styles are applied with Alt+1-8 from the addLoadoutListener filter keyed to the
// current style loadout, so menu items carry no per-item Alt accelerators
subMenu!!.addItem(
    lhb[style.name], 0
) { e: BBSelectionData -> onStyleSelect.accept(BBStyleSelection(style, e.widget)) }
Dominant language
Kotlin
Stars
15
Forks
11
Avg merge
13h 16m
Merged PRs (30d)
9

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from aphtech/brailleblaster

All issues in aphtech/brailleblaster

Similar issues

More Kotlin issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.