Re: Mouse support for just the wheel and left button.
On Thu, 17 Dec 2015 08:52:05 +0300, Andrei Borzenkov wrote: > 17.12.2015 05:52, John Murphy пишет: > > Hello and thanks for Grub. I use it daily. > > > > You need to boot so often? :) Twice today already! :) > > > I've seen questions regarding mouse support, but the answers imply that an > > on-screen pointer is requested. I would find it very useful to be able to > > use the mouse scroll wheel (which is just two switch clicks if I understand > > correctly) to move up and down between entries, and one click on the left > > mouse button to emulate pressing Enter. > > > > All that would seem necessary is for wheel up-button to do up arrow, wheel > > down-button - down arrow and left-button - Enter. > > > > GRUB mostly relies on firmware support. At least for EFI there is no > notion of "wheel", only mouse move events. I do not know if mouse can be > accessed via BIOS at all. I'm able to scroll through entries on pages in my BIOS using the wheel (Asus Maximus VII Formula). Not sure if that means anything. > > For tablet type devices using volume up/down and tap may work for menu > selection, assuming that modern devices are EFI based. > > > I have my own reasons for wanting the feature, but, while searching for > > information, I saw that some users are finding their USB keyboard isn't > > supported and they may have found simple mouse button and wheel support > > useful. > > > > It could also help those who usually use on-screen keyboards like the > > quite excellent OnBoard. > > > > Someone who has hardware and can actually test it needs to send patches. Happy to test on mine, but I'd need a few pointers on how to apply a patch. (I've tested kernel patches for a developer, which were committed.) -- I've joined the list, so no need to CC, thanks. ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
Re: Mouse support for just the wheel and left button.
On Thu, Dec 17, 2015 at 01:34:10PM +, John Murphy wrote: > I'm able to scroll through entries on pages in my BIOS using the wheel > (Asus Maximus VII Formula). Not sure if that means anything. That probably doesn't mean anything. The firmware can choose to handle the mouse in any way it wants, but the interface actually provided to the boot loader through EFI is more limited. The UEFI spec mentions x, y and z axis for a pointing device and recommends using z-axis for scrolling, but I don't know if the mouse wheel would be used as a z-axis, or just button 4 and 5 (which uefi doesn't do, only left and right). -- Len Sorensen ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
Re: Mouse support for just the wheel and left button.
On Thu, 17 Dec 2015 11:03:41 -0500, Lennart Sorensen wrote: > On Thu, Dec 17, 2015 at 01:34:10PM +, John Murphy wrote: > > I'm able to scroll through entries on pages in my BIOS using the wheel > > (Asus Maximus VII Formula). Not sure if that means anything. > > That probably doesn't mean anything. The firmware can choose to handle > the mouse in any way it wants, but the interface actually provided to > the boot loader through EFI is more limited. > > The UEFI spec mentions x, y and z axis for a pointing device and > recommends using z-axis for scrolling, but I don't know if the mouse wheel > would be used as a z-axis, or just button 4 and 5 (which uefi doesn't do, > only left and right). If 'standards' have carried through from xorg.conf / mousedrv, buttons 4 and 5 would be wheel buttons. Button 4 is the default for "which button must be held down to enable wheel emulation mode." (man mousedrv) but again - may not mean anything. -- ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
Re: Mouse support for just the wheel and left button.
17.12.2015 05:52, John Murphy пишет: > Hello and thanks for Grub. I use it daily. > You need to boot so often? :) > I've seen questions regarding mouse support, but the answers imply that an > on-screen pointer is requested. I would find it very useful to be able to > use the mouse scroll wheel (which is just two switch clicks if I understand > correctly) to move up and down between entries, and one click on the left > mouse button to emulate pressing Enter. > > All that would seem necessary is for wheel up-button to do up arrow, wheel > down-button - down arrow and left-button - Enter. > GRUB mostly relies on firmware support. At least for EFI there is no notion of "wheel", only mouse move events. I do not know if mouse can be accessed via BIOS at all. For tablet type devices using volume up/down and tap may work for menu selection, assuming that modern devices are EFI based. > I have my own reasons for wanting the feature, but, while searching for > information, I saw that some users are finding their USB keyboard isn't > supported and they may have found simple mouse button and wheel support > useful. > > It could also help those who usually use on-screen keyboards like the > quite excellent OnBoard. > Someone who has hardware and can actually test it needs to send patches. ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
Mouse support for just the wheel and left button.
Hello and thanks for Grub. I use it daily. I've seen questions regarding mouse support, but the answers imply that an on-screen pointer is requested. I would find it very useful to be able to use the mouse scroll wheel (which is just two switch clicks if I understand correctly) to move up and down between entries, and one click on the left mouse button to emulate pressing Enter. All that would seem necessary is for wheel up-button to do up arrow, wheel down-button - down arrow and left-button - Enter. I have my own reasons for wanting the feature, but, while searching for information, I saw that some users are finding their USB keyboard isn't supported and they may have found simple mouse button and wheel support useful. It could also help those who usually use on-screen keyboards like the quite excellent OnBoard. -- I've joined the list, so no need to CC, thanks. ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
USB mouse support, patch against trunk.
Hi, This is a patch for usb mouse support in GRUB. I cannot take credit for the code. It was written by a former colleague of mine (Christer Weinigel). Added some cleanups and a bugfix. It should be usable as is for most standard protocol mice. Regards, Christian mouse.patch Description: mouse.patch ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
Basic mouse support (cursor)
Over the past few days, I've been hacking on GRUB, and implemented mouse support in the form of a virtual keyboard. That is when you move the mouse around it generates arrow key presses or enter on clicks. The attached patch is based on current bzr trunk (4559) and also fixes a build error with a missing file (reported here: http://lists.gnu.org/archive/html/grub-devel/2012-07/msg00042.html). I implemented it as a module (based on at_keyboard), so the patch only adds the c and h files and adds it to the modules list. Once compiled and installed, load the ps2mouse module, and run terminal_input ps2mouse. I highly recommend NOT doing it in your grub.cfg* until you verify it works since it implements its own ps2 keyboard driver (99% copy and pasted from at_keyboard). Once you've set the input to ps2mouse, you can use the mouse, but by default it only allows up and down movement. To enable all movement, run mousectl enable x. Also disabled by default is clicking; enable with mousectl mousemode. Since I didn't hire multi-million dollar user studies, the threshold for movement may require some changes to suit your liking. Luckily, its easy to fix with mousectl sensitivity y someNumber or mousectl sensitivity x someNumber (defaults are 20 and 12 respectively). The mousectl command has a few other features, so check the help or source. I know the source needs a bit of cleanup, but this is the first revision. Any feedback is appreciated. I've tested it in QEMU and on real hardware (wireless usb mouse actually), and only bug is a spurrious right click occationally (which goes to edit mode). I'm currently using this on my computer that has about 30 boot entries, and I really like it since I don't have to hit the down arrow 30 times. *While testing, I used this entry that I found useful: menuentry 'Load mouse' { terminal_input ps2mouse mousectl mousemode } Patrick grub-patch1.diff Description: Binary data ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
Re: Mouse support in GRUB
On 01.10.2011 23:18, Vladimir 'φ-coder/phcoder' Serbinenko wrote: On 01.10.2011 23:11, Vincent Pelletier wrote: More seriously, I feel the only value in this patch is in the ieee1275 wrappers for framebuffer entrypoints. Yes, that's interesting. We have ieee1275 framebuffer support on ppc but it fails and hence is disabled on sparc. Expecting this patch will allow me to find out why. Actually there was nothing wrong with ieee1275_fb and it works on sparc. The problem is that sparc64 code allocates only 2MiB at most for heap which is small for graphics. I'll see if there is a way to allocate more safely. -- Regards Vladimir 'φ-coder/phcoder' Serbinenko ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
Mouse support in GRUB
Hi GRUB devels, recently I came across the improvements made by Microsoft Windows 8 in their bootloader. http://blogs.msdn.com/b/b8/archive/2011/09/20/reengineering-the-windows-boot-experience.aspx However I despise the operating system itself ( :-P ), the idea of a beautiful graphical bootloader with mouse support integrated into it felt amazing to me. It lowered the barrier for the user, and gave the user an at-home experience right from switching on the computer. I wanted to check if something similar can be done with GRUB, and found out about the gfxmenu that was merged in 0.98. I think it is a great step forward, and would be a really nice addition to all major distributions in near future. However, I think that the graphical menu is somewhat incomplete without mouse support. So I wish to work on implementing mouse support for GRUB. However, I am a novice to the GRUB codebase, and need some help with understanding the relevant parts and with testing my implementation. I myself have done a little bit of reading, reading the source code for the term module which implements the keyboard support into GRUB, and have more or less understood it. Also, I read up the HID specifications document for USB devices. It would be really wonderful if someone with experience with the relevant code can help me by guiding me when needed, and help me with a few of the problems i am facing with testing my build of GRUB with qemu. -- Regards Tirtha Chatterjee KDE developer http://wyuka.co.cc/ ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
Re: Mouse support in GRUB
On 01.10.2011 15:39, Tirtha Chatterjee wrote: It would be really wonderful if someone with experience with the relevant code can help me by guiding me when needed, and help me with a few of the problems i am facing with testing my build of GRUB with qemu. This is not an easy task. Unlike keyboard mouse needs to be either polled pretty quickly or used with interrupts. Also it will mean that you'll need to adjust graphics driver to show the cursor and to move it quickly bypassing the usual core. Only the events like mouse clicks should go through something like grub_checkkey or grub_checkkey itself. -- Regards Vladimir 'φ-coder/phcoder' Serbinenko signature.asc Description: OpenPGP digital signature ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
Re: Mouse support in GRUB
On 1 October 2011 15:39, Tirtha Chatterjee tirtha.p.chatter...@gmail.com wrote: Hi GRUB devels, recently I came across the improvements made by Microsoft Windows 8 in their bootloader. http://blogs.msdn.com/b/b8/archive/2011/09/20/reengineering-the-windows-boot-experience.aspx However I despise the operating system itself ( :-P ), the idea of a beautiful graphical bootloader with mouse support integrated into it felt amazing to me. It lowered the barrier for the user, and gave the user an at-home experience right from switching on the computer. I I don't think the user needs to feel exceptionally home at the bootloader so long as the bootloader does its job well - boots the system asap. If you really want to lower the barrier then it would be good to have touchscreen support on devices that have one. With a touchscreen the user could select from the menu with much more ease than with a mouse. This however needs the touch sensor come aligned with the screen or some calibration needs to be done to figure out what part of the touch sensor corresponds to which part of the screen. Also if you want the user feel at home so much they don't need to touch the keyboard how do you tackle the question much more challenging than how to select from a graphical menu - what to select from there, or what to load from the disk in case the menu is not preconfigured. Thanks Michal ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
Re: Mouse support in GRUB
On 01.10.2011 19:12, Michal Suchanek wrote: On 1 October 2011 15:39, Tirtha Chatterjee tirtha.p.chatter...@gmail.com wrote: Hi GRUB devels, recently I came across the improvements made by Microsoft Windows 8 in their bootloader. http://blogs.msdn.com/b/b8/archive/2011/09/20/reengineering-the-windows-boot-experience.aspx However I despise the operating system itself ( :-P ), the idea of a beautiful graphical bootloader with mouse support integrated into it felt amazing to me. It lowered the barrier for the user, and gave the user an at-home experience right from switching on the computer. I I don't think the user needs to feel exceptionally home at the bootloader so long as the bootloader does its job well - boots the system asap. I agree. Also using keyboard is much faster and precise in this case and doesn't need any additional knowledge. So entry barrier talk is a nonsense. However in the domain of fancy people have strange preference and I decided long time ago to allow such features as long as it's well coded and disabled by default. If you really want to lower the barrier then it would be good to have touchscreen support on devices that have one. With a touchscreen the user could select from the menu with much more ease than with a mouse. This however needs the touch sensor come aligned with the screen or some calibration needs to be done to figure out what part of the touch sensor corresponds to which part of the screen. I agree with this as well. Additionally some device can work in tablet mode. Actually I tried to order touchbook because of exactly this reason but never got one. Also if you want the user feel at home so much they don't need to touch the keyboard how do you tackle the question much more challenging than how to select from a graphical menu - what to select from there, or what to load from the disk in case the menu is not preconfigured. Thanks Michal ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel -- Regards Vladimir 'φ-coder/phcoder' Serbinenko signature.asc Description: OpenPGP digital signature ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
Re: Mouse support in GRUB
Le samedi 01 octobre 2011 15:39:12, Tirtha Chatterjee a écrit : So I wish to work on implementing mouse support for GRUB. I've attached the result of my early fidling with grub on sparc. Yeah, once I got grub to load, I made a serial msmouse work instead of working on things like actually getting it to boot any OS. It most certainly won't be applying cleanly on current code, and it is highly unlikely that I rebase it myself. This adds 2 modules to grub, each with a single command. Both modules require ieee1275, and were only tested on sparc. One opens a serial port and moves a mouse cursor on screen. It doesn't integrate with anything (no event system...). The other draws a mandelbrot fractal (this is off-topic, but it was in the same patch...). More seriously, I feel the only value in this patch is in the ieee1275 wrappers for framebuffer entrypoints. If anyone feels like integrating any chunk, please do. I had signed the copyright assignment back then, so you can consider the FSF own copyright on that patch already, as far as I'm concerned. -- Vincent Pelletier Index: commands/ieee1275/mandelbrot.c === RCS file: commands/ieee1275/mandelbrot.c diff -N commands/ieee1275/mandelbrot.c --- /dev/null 1 Jan 1970 00:00:00 - +++ commands/ieee1275/mandelbrot.c 25 Aug 2005 09:05:09 - @@ -0,0 +1,145 @@ +/* mandelbrot.c - Draws a nice Manldebrot fractal. */ +/* + * GRUB -- GRand Unified Bootloader + * Copyright (C) 2005 Free Software Foundation, Inc. + * + * GRUB is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GRUB; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include grub/rescue.h +#include grub/dl.h +#include grub/misc.h +#include grub/machine/kernel.h +#include grub/ieee1275/ieee1275.h +#include grub/ieee1275/fb.h +#include grub/ieee1275/fbprops.h + +#ifndef GRUB_EMBED +static grub_err_t +grub_cmd_mandelbrot (struct grub_arg_list *state __attribute__ ((unused)), + int argc, char **argv) +#else /* GRUB_EMBED */ +static void +grub_cmd_mandelbrot (int argc, char *argv[]) +#endif /* ! GRUB_EMBED */ +{ + grub_ieee1275_ihandle_t screen; + grub_ieee1275_phandle_t pscreen; + const unsigned int nmax = 25; + unsigned int n, x, y, w, h, a; + const double xmin = -2.5, xmax = 2.5, ymin = -2, ymax = 2; + double dx, dy, rz, iz, tz, rc, ic; + unsigned char *fb, tmp[4]; + char *device; + grub_ssize_t actual; + + if(argc == 1) +device = argv[0]; + else +device = screen; + grub_printf(Using device %s...\n,device); + if (!grub_ieee1275_open (device, screen)) +{ + grub_ieee1275_finddevice (device, pscreen); + h = grub_ieee1275_fb_height (pscreen); + w = grub_ieee1275_fb_width (pscreen); + grub_printf(w=%d h=%d\n,w,h); + grub_ieee1275_get_property (pscreen,address,tmp,sizeof(tmp),actual); + fb = (unsigned char *) grub_ieee1275_decode_int_4(tmp); +// fb = (unsigned char *) grub_ieee1275_fb_addr (pscreen); + grub_printf (Framebuffer is at %p.\nClearing screen...\n, fb); + for (a = 0; a w * h; a++) +fb[a] = 0; + for (a = 0; a 256; a++) /* Fill palette with shades of gray. */ +grub_ieee1275_setcolor (screen, a, a, a, a); + dx = (xmax - xmin) / w; + dy = (ymax - ymin) / h; + for (x = 0; x w; x++) +{ + rc = xmin + x * dx; + for (y = 0; y h; y++) +{ + ic = ymin + y * dy; + rz = 0; + iz = 0; + for (n = 1; n nmax; n++) +{ + tz = rz * rz - iz * iz + rc; + iz = 2 * rz * iz + ic; + rz = tz; + if (rz * rz + iz * iz = 4) +{ + fb[x+w*y] = (n*255/nmax) % 256; + n = nmax; +} +} + if (rz * rz + iz * iz 4) +fb[x+w*y]=255; +} +} +#if 0 + grub_ieee1275_close (screen); /* If screen is closed, it goes black. */ +#endif +} + grub_printf(Finished !\n); +#ifndef GRUB_EMBED + return 0; +#endif /* ! GRUB_EMBED */ +} + + +#ifdef GRUB_EMBED +void +grub_mandelbrot_init (void) +{ + grub_rescue_register_command (mandelbrot, grub_cmd_mandelbrot, +Draws a fractal.); +} + +void +grub_mandelbrot_fini
Re: Mouse support in GRUB
On 01.10.2011 23:11, Vincent Pelletier wrote: More seriously, I feel the only value in this patch is in the ieee1275 wrappers for framebuffer entrypoints. Yes, that's interesting. We have ieee1275 framebuffer support on ppc but it fails and hence is disabled on sparc. Expecting this patch will allow me to find out why. -- Regards Vladimir 'φ-coder/phcoder' Serbinenko signature.asc Description: OpenPGP digital signature ___ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel
Mouse support
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I added basic mouse support for ieee1275. It's really, really basic : - -Only works with serial mice - -Only works with Microsoft 2 buttons protocol (might work for 3 buttons without wheel) - -One has to set the serial speed from OpenFirmware command line - -I only use what the mouse give me : button pushed or not, x y deltas (nothing like [double] click handling). - -For some reason, the mouse is very choppy, like 3 updates per second, and it sometimes has strange moves - but I guess the second is because it's an old, old retired mouse. And for now it doesn't return (I should add a key press detection or something...). I'm writing a clean patch to add both Mandelbrot mousetest commands - IEEE1275 only for now. Vincent Pelletier -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFDDYB4FEQoKRQyjtURAqxKAJ9hwo0cIZ9VNgZQjg0uiS6hrAkziwCgiJ7H r5h6IFSQ1F11PhdAhbBfF3Q= =kJDp -END PGP SIGNATURE- ___ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com ___ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel