Good.Thanks for sharing your code.But instead raising old threads create new topic with your solution.
I too used this hotkey component in one of my application.But when coming to the inputtext+hotkey combination I just used javascript handler solution instead jquery.
Hotkey within inputText [showcase]
Author,Speaker
https://twitter.com/sudheerjonna
Github: https://github.com/sudheerj
Website http://sudheerjonna.com/
___________________
Sudheer Jonna
https://twitter.com/sudheerjonna
Github: https://github.com/sudheerj
Website http://sudheerjonna.com/
___________________
Sudheer Jonna
Well it may be little bit old, but when you google this problem, you will end on this page. Thats the reason, I have added it here (and also because munkee requested it).sudheer wrote:Good.Thanks for sharing your code.But instead raising old threads create new topic with your solution.
I too used this hotkey component in one of my application.But when coming to the inputtext+hotkey combination I just used javascript handler solution instead jquery.
Well I removed p:hotkey and did this :
So for me p:hotkey must be improved.
Code: Select all
<p:remoteCommand name="f9remoteCommand" action="#{beanView.modify}" />
<script>
$(window).keydown(function (event) {
if (event.which == 120) {
f9remoteCommand();
}
})
</script>
See the very last line of the documentation page: https://primefaces.github.io/primefaces ... ?id=hotkey
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
It looks like its is intentional: https://github.com/primefaces/primefaces/issues/2045
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
I know that the limitation is in the documentation.
But it is not very handy. Imagine you have a lot of input fields, you have to hit the tabulation a lot of time to get out of focus and then trigger the hotkey.
In my case, the users want to be able to validate a form without clicking.
I'm happy with my "workaround" but I would have preferred using p:hotkey.
But it is not very handy. Imagine you have a lot of input fields, you have to hit the tabulation a lot of time to get out of focus and then trigger the hotkey.
In my case, the users want to be able to validate a form without clicking.
I'm happy with my "workaround" but I would have preferred using p:hotkey.
-
- Posts: 1
- Joined: 17 Jul 2023, 13:26
Did anyone solve this issue by writing there own handler?
-
- Information
-
Who is online
Users browsing this forum: No registered users and 10 guests