mvKey_Prior / mvKey_Next mapping issue

Open Beginner friendly
#2,658 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
65/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
cpp, python
Domain
desktop

Research direction

Run the provided standalone Python example on Dear PyGui 2.3.1 and compare the reported constants with the Page Up and Page Down events. Trace the key-constant mapping used by add_key_press_handler, then verify that mvKey_Prior and mvKey_Next match the generated events and that the example triggers both callbacks.

Written by the indexing model from the issue text.

Description

state: pending type: bug
Dear PyGui version:

2.3.1

Python version:

3.14.5

Operating system:

Windows 11 25H2

My issue/question:

I was using Python 3.14.3 + dpg 2.2, but recently updated to Python 3.14.5 + dpg 2.3.1.

After that, dpg.mvKey_Prior and dpg.mvKey_Next stopped working.

Upon checking the cause, I found that while dpg.mvKey_Prior outputs the previous value of 33, the actual key value is 517.

Considering that dpg.mvKey_Up is showing 515, I suspect there might have been some omission during the mapping value change.

It is working fine now that I have switched back to dpg 2.2.

Steps to reproduce:
  1. add_key_press_handler
  2. press key
Expected behavior:

Events are triggered on Page Up/Down keys

Screenshots:

N/A

Standalone, minimal, complete and verifiable example:
import dearpygui.dearpygui as dpg


def onKeyPressed(sender=None, appData=None, userData=None):
    print(f"key pressed: {appData}")


dpg.create_context()
dpg.create_viewport(title='123')

with dpg.handler_registry():
    dpg.add_key_press_handler(key=dpg.mvKey_Up, callback=onKeyPressed)
    dpg.add_key_press_handler(key=dpg.mvKey_Prior, callback=onKeyPressed)
    dpg.add_key_press_handler(key=dpg.mvKey_Next, callback=onKeyPressed)
    
print(f"mvKey_Up: {dpg.mvKey_Up}")
print(f"mvKey_Prior: {dpg.mvKey_Prior}")
print(f"mvKey_Next: {dpg.mvKey_Next}")

dpg.setup_dearpygui()
dpg.show_viewport()
dpg.start_dearpygui()
Dominant language
C++
Stars
15.6k
Forks
784
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

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 hoffstadt/DearPyGui

All issues in hoffstadt/DearPyGui

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.