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

[F.Rq.] Allow pasting 0xHHHH-formatted numbers in a HexTextBox (e.g. in WatchEditor) #3682

Closed
YoshiRulz opened this issue Jun 13, 2023 · 2 comments · Fixed by #3684
Closed
Labels
App: EmuHawk Relating to EmuHawk frontend Enhancement For feature requests or possible improvements

Comments

@YoshiRulz
Copy link
Member

Went to add Ctrl+V check to keydown handler, but I have no idea what these magic numbers are. Official docs (current) were no help, nor was StackOverflow.

protected override void OnKeyPress(KeyPressEventArgs e)
{
if (e.KeyChar == '\b' || e.KeyChar == 22 || e.KeyChar == 1 || e.KeyChar == 3)
{
return;
}

@YoshiRulz YoshiRulz added Enhancement For feature requests or possible improvements App: EmuHawk Relating to EmuHawk frontend labels Jun 13, 2023
@Morilli
Copy link
Collaborator

Morilli commented Jun 13, 2023

I'm in favor of removing all that custom logic and just doing a simple check for validity after the user is finished entering the number, like in c78c0c3

@kalimag
Copy link
Contributor

kalimag commented Jun 17, 2023

Supporting the $HH format used by most (dis)assemblers would also be nice to have.

Same goes for trimming whitespace before truncating the length.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
App: EmuHawk Relating to EmuHawk frontend Enhancement For feature requests or possible improvements
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants