Skip to content
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

BadUSB: BLE, media keys, Fn/Globe key commands #3403

Merged
merged 8 commits into from
Mar 25, 2024
Merged

Conversation

nminaylov
Copy link
Member

@nminaylov nminaylov commented Jan 29, 2024

What's new

Verification

  • Run BadUSB scripts with MEDIA and GLOBE commands
  • Select BLE transport and run demo scripts

Checklist (For Reviewer)

  • PR has description of feature/bug or link to Confluence/Jira task
  • Description contains actions to verify feature/bugfix
  • I've built this code, uploaded it to the device and verified feature/bugfix

Copy link

github-actions bot commented Jan 29, 2024

Compiled f7 firmware for commit 3df725f0:

@nminaylov nminaylov marked this pull request as ready for review January 29, 2024 16:32
@nminaylov nminaylov marked this pull request as draft February 2, 2024 11:39
@nminaylov nminaylov marked this pull request as ready for review February 17, 2024 09:56
Copy link

PVS-Studio report for commit 4e2e796f:

@nminaylov nminaylov changed the title BadUSB: media keys, Fn/Globe key commands BadUSB: BLE, media keys, Fn/Globe key commands Feb 27, 2024
@skotopes skotopes merged commit 6de2934 into dev Mar 25, 2024
11 checks passed
@skotopes skotopes deleted the nm/badusb_media_keys branch March 25, 2024 08:39
vanguacamolie added a commit to vanguacamolie/flipperzero-firmware that referenced this pull request Mar 31, 2024
Commit 6de2934 (BadUSB: BLE, media keys, Fn/Globe key commands (flipperdevices#3403),
2024-03-25) changed the life-cycle of the bad_usb_script object, so that
the bad_usb_script is allocated when entering the work scene, and freed
when going to the config scene. It also made it so that the keyboard
layout always gets reloaded when entering the work scene.

The logic of the layout config scene, however, assumes that it still
needs to reload the keyboard layout after selecting it. The keyboard
layout data is stored within bad_usb_script however, which is NULL when
within the layout config scene.

The fix is simple. Since we are now reload the keyboard layout anyway
when entering the work scene, we can just remove this extra call.
vanguacamolie added a commit to vanguacamolie/flipperzero-firmware that referenced this pull request Mar 31, 2024
Commit 6de2934 (BadUSB: BLE, media keys, Fn/Globe key commands (flipperdevices#3403),
2024-03-25) changed the life-cycle of the bad_usb_script object, so that
the bad_usb_script is allocated when entering the work scene, and freed
when going to the config scene. It also made it so that the keyboard
layout always gets reloaded when entering the work scene.

The logic of the layout config scene, however, assumes that it still
needs to reload the keyboard layout after selecting it. The keyboard
layout data is stored within bad_usb_script however, which is NULL when
within the layout config scene.

The fix is simple. Since we are now reload the keyboard layout anyway
when entering the work scene, we can just remove this extra call.

Resolves: flipperdevices#3552
skotopes pushed a commit that referenced this pull request Apr 1, 2024
Commit 6de2934 (BadUSB: BLE, media keys, Fn/Globe key commands (#3403),
2024-03-25) changed the life-cycle of the bad_usb_script object, so that
the bad_usb_script is allocated when entering the work scene, and freed
when going to the config scene. It also made it so that the keyboard
layout always gets reloaded when entering the work scene.

The logic of the layout config scene, however, assumes that it still
needs to reload the keyboard layout after selecting it. The keyboard
layout data is stored within bad_usb_script however, which is NULL when
within the layout config scene.

The fix is simple. Since we are now reload the keyboard layout anyway
when entering the work scene, we can just remove this extra call.

Resolves: #3552
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants