Αλληλεπίδραση ποντικιού
- 10.1.1. Κουμπιά
- 10.1.2. Επιλογή αντικειμένων
- 10.1.3. Μεταφορά κι απόθεση
- 10.1.4. Διάδραση ποντικιού με εφαρμογές του πίνακα εφαρμογών (Μικροεφαρμογές)
10.1.1. Κουμπιά

Για τους περισσότερους χρήστες, το ποντί παρέχει τον κύριο τρόπο διάδρασης με γραφικέ ςδιεπαφές χρήστη. Ο όρος "ποντίκι" χρησιμοποιείται σε αυτήν την ενότητα για να συμπεριλάβει άλλες συσκευές ένδειξης που μποεούν να χρησιμοποιηθούν για την κίνηση του δρομέα μέσα στην οθόνη, όπως οι ιχνόσφαιρες, τα trackpad, οι διαστημόμπαλες, οι γραφικές πινακίδες, ή συσκευές τεχνολογίας υποβοήθησης που προσομοιώνουν ένα ποντίκι.
Για δεξιόχειρους χρήστες, το αριστερό κουμπί σε ένα συμβατικό ποντίκι χρησιμοποιείται για την πλειοψηφία των ενεργειών του ποντικιού. Εμείς επομένως το ονομάζουμε εδώ
, ακόμη κι αν δεν είναι φυσιολογικά στην ίδια περίπτωση. Για αυτό το λόγο, μερικές φορές θα δείτε ότι αυτό το κουμπί αναφέρεται στον κώδικα ή στην τεκμηρίωση ως "Κουμπί 1" ή ως "Κουμπί επιλογής".Similarly for right-handed users, the right button on a conventional mouse is used for operations involving pop-up menus. We therefore call it the
in this chapter. You may sometimes see this button referred to in code or documentation as "Button 3" or the "Menu Button".A conventional mouse with three buttons normally has its third button (or a scrollwheel that acts as a button when pushed) between the left and right buttons. We therefore call it the
, but you may sometimes see this referred to in code or documentation as "Button 2" or the "Transfer Button".Your application uses left button gestures for selecting, activating components, dragging, and the display of drop-down menus.
Your application uses right button gestures to display and select actions from a popup menu.
-
Your application uses the middle button to paste the current PRIMARY (usually the last-highlighted) selection at the pointer position, as follows:
Table 10-1 Effect of modifier keys on a transfer operationΤροποποίηση Συνάρτηση Μη τροποποιημένο Αντιγραφή επιλογής Ctrl Αντιγραφή επιλογής Shift Μετακίνηση επιλογής Shift+Ctrl Δημιουργία συνδέσμου, συντόμευσης ή ψευδώνυμο στην επιλογή Do not over-ride this functionality in any part of your user interface where the transfer action is likely to be useful. If you do intend to use the middle button for a different purpose somewhere, only do so as a shortcut for experienced users, and only for operations that can also be performed without using the
or . If present on the mouse, the scrollwheel should scroll the window or control under the pointer, if it supports scrolling. Initiating scrolling in this way should not move keyboard focus to the window or control being scrolled.
Ctrl+ should zoom into the window or control under the mouse pointer, and Ctrl+ should zoom out. Zooming in this way should not move keyboard focus to the window or control being zoomed.
Do not depend on input from the middle or right mouse buttons. As well as being physically more difficult to click, some pointing devices and many assistive technology devices only support or emulate the left mouse button. Some assistive technologies may noteven emulate the mouse at all, but generate keyboard events instead.
Ensure that every operation in your application that can be done with the mouse can also be done with the keyboard. The only exceptions to this are actions where fine motor control is an essential part of the task. For example, controlling movement in some types of action games, or freehand painting in an image-editing application.
Do not warp the mouse pointer, or restrict mouse movement to part of the screen. This can interfere with assistive technologies, and is usually confusing even for users who do not rely on assistive technologies.
Do not require the use of chording (pressing multiple mouse buttons simultaneously) for any operations.
Do not require the use of multiple (triple- or quadruple-) clicking actions for any operations, unless you also provide an accessible alternative method of performing the same action.
Allow all mouse operations to be cancelled before their completion. Pressing the Esc key should cancel any mouse operation in progress, such as dragging and dropping a file in a file manager, or drawing a shape in a drawing application.
Do not assign any actions exclusively to the middle button of a three-button mouse, as not all mice have one.
Do not hard-code mouse target sizes, or make them too small. Define any mouse targets to be at least as large as the arrow button in a GtkSpinBox in the current gtk theme. Bear in mind that a user with impaired dexterity or vision may be using a theme that results in considerably larger widgets than the default theme.
Do not refer to particular mouse buttons in your interface unless absolutely necessary. Not everybody will be using a conventional mouse with left, middle and right buttons, so any text or diagrams that refer to those may be confusing.
10.1.2. Επιλογή αντικειμένων
- 10.1.2.1. Αντιστοιχία ποντικιού και πληκτρολογίου
- 10.1.2.2. Επιλογή πεδίου οριοθέτησης
10.1.2.1. Αντιστοιχία ποντικιού και πληκτρολογίου
Για ελέγχους ή παράθυρα που περιέχουν έναν αριθμό αντικειμένων που ο χρήστης μπορεί να επιλέξει, είτε απλά είτε πολλαπλά, βεβαιωθείτε ότι ακολουθούνται οι επόμενοι μηχανισμοί για να επιτρέπεται να γίνονται επιλογές είτε με το ποντίκι είτε με το πληκτρολόγιο.
Ποντίκι | Πληκτρολόγιο | |
---|---|---|
Επιλογή αντικειμένου, αποεπιλογή όλων των άλλων | Κλικ | Διάστημα |
Προσθήκη/αφαίρεση από την επιλογή | Ctrl κλικ (εναλλάσσει την κατάσταση επιλογής του αντικειμένου) | Ctrl+Διάστημα (εναλλάσσει την κατάσταση επιλογής του εστιασμένου αντικειμένου) |
Εκτεταμένη επιλογή | Shift κλικ | Shift+Διάστημα, Shift+Αρχή, Shift+End, Shift+PageUp, ή Shift+PageDown |
Μετακίνηση εστίασης | Κάντε κλικ στο κατάλληλο στοιχείο για να το επιλέξετε | Τα πλήκτρα δείκτη, το Αρχή, το End, το PageUp και το PageDown μετακινούν την εστίαση και την επιλογή ταυτόχρονα. Οι συνδυασμοί πλήκτρων Ctrl+πλήκτρα δείκτη, Ctrl+Home,Ctrl+End, Ctrl+PageUp, και Ctrl+PageDown μετακινούν την εστίαση χωρίς να επηρεάζουν την τρέχουσα επιλογή. |
Επιλογή όλων | Κάντε κλικ στο πρώτο στοιχείο, ύστερα Shift κάντε κλικ στο τελευταίο στοιχείο | Ctrl+Ω |
Αποεπιλογή όλων | Κάντε κλικ στην περιοχή του παρασκηνίου | Shift+Ctrl+Ω |
Ενεργοποίηση επιλογής | Κάντε κλικ για να ενεργοποιήσετε μία απλή επιλογή. Το Shift ή το Ctrl με διπλό κλικ επεκτείνει ή προσθέτει στοιχείο στην επιλογή πρώτα πριν την ενεργοποίηση ολόκληρης της επιλογής. | Το Return ενεργοποιεί ολόκληρη την επιλογή. Αν δεν έχει επιλεγεί κάτι μέχρι τότε, επιλέγει πρώτα το αντικείμενο που έχιε επισημανθεί τη στιγμή εκείνη. |
Αντιστροφή επιλογής | Δεν υπάρχει ισοδύναμη ενέργεια χωρίς το ποντίκι | Ctrl+Ε |
10.1.2.2. Επιλογή πεδίου οριοθέτησης
For a container whose objects may be arranged in two dimensions, for example the icon view in a file manager, allow multiple selection by dragging a bounding box (sometimes called a "rubber band") around one or more objects. Shift + drag should add all the objects within the bounding box to the existing selection. Ctrl + drag should toggle the selected state of all the objects within the bounding box.
-
Επιτρέψτε τη χρήση μίας επιλογής πεδίου με περίγραμμα να ξεκινά μόνο αν πιέζεται το αρχικό κουμπί του ποντικιού:
- Μέσα στα όρια του παρασκηνίου του πλαισίου, και
- έξω από τα όρια κάθε άλλου αντικειμένου στο ίδιο πλαίσιο που μπορεί να μεταφερθεί.
In a drawing application, for example, this means that a bounding box click and drag could start on a blank area of the canvas, or within a shape that had been locked down to prevent accidental editing, but not in an active shape which would itself be dragged instead.
Select any objects that lie wholly or partly within the bounding box when the mouse button is released.
Use dynamic highlighting during the drag to show which objects will be selected. Do not wait until the mouse button is released. This avoids any uncertainty about which objects will be selected by the bounding box.
When a bounding box is being dragged out within a scrollable window, support automatic scrolling of that window when the box is dragged near the window's edges.


10.1.3. Μεταφορά κι απόθεση
Drag and drop is a direct manipulation technique, where you perform actions on selected objects by moving them around the screen with the mouse. You "drag" an object by clicking it, then holding the button while you move the pointer to the object's target location. The object is "dropped" at that location by releasing the mouse button.
-
Use drag and drop only where the user can reasonably guess what the effect might be. The most common uses are:
- για να μετακινήσετε ή να αντιγράψετε αντικείμενα από μία τοποθεσία σε μία άλλη
- για να συνδέσετε ένα αντικείμενο με κάποιο άλλο
- για να εκτελέσετε μία ενέργεια στα αντικείμενα μεταφέροντάς τα σε ένα εικονίδιο που αντιπροσωπεύει αυτή την ενέργεια, όπως το εικονίδιο για τα απορρίματα ή το εικονίδιο εκτύπωσης.
Provide visual feedback throughout a drag and drop operation. Highlight valid targets and change the mouse pointer as it passes over them. Use the "no drop" mouse pointer when passing over invalid drop targets. See also Ενότητα 10.1.3.2 ― Δείκτες ποντικιού για μεταφορά κι απόθεση.
-
Augment the mouse pointer with a representation of the objects being dragged. Keep this representation small or make it translucent, so as not to obscure possible drop targets underneath it. See also Ενότητα 10.1.3.2 ― Δείκτες ποντικιού για μεταφορά κι απόθεση.
Φιγούρα 10-3 Example of copy pointer augmented by an icon representing the file being copied Only allow objects to be copied between applications, not moved. This avoids any confusion about which application's
function reverses the operation.-
Allow the user to cancel a drag and drop operation by all of these methods:
- πιέζοντας το πλήκτρο Esc πριν την απελευθέρωση του κουμπιού του ποντικιού
- dropping the object back on its original location
- performing a query drag and selecting on the pop-up menu (see Ενότητα 10.1.3.1.2 ― Μεταφορά ερωτήματος)
- αποθέτοντας το αντικείμενο σε ένα μη έγκυρο προορισμό απόθεσης.
Allow the user to undo the effects a drag and drop operation by selecting
.Allow multiple objects to be dragged by Shift or Ctrl selecting them, then dragging any one of the selected objects.
Ensure that keyboard users can replicate all drag and drop actions using only menu items or keyboard shortcuts, such as Ctrl+C) and (Ctrl+V).
(When an item is being dragged within or into a scrollable window, support automatic scrolling of that window when the mouse is moved near its edges.
Pop up a menu when the user attemps to drop multiple objects on a target that only accepts single objects. On the menu, list all the objects being dragged, and a
item.
10.1.3.1. Αντικατάσταση συμπεριφοράς για μεταφορά κι απόθεση
- 10.1.3.1.1. Μετατροπείς πληκτρολογίου
- 10.1.3.1.2. Μεταφορά ερωτήματος
10.1.3.1.1. Μετατροπείς πληκτρολογίου
Allow the user to force the behavior of a drag and drop operation by holding the Ctrl, Shift or both keys throughout. If the user changes modifier keys after they have started the drag, change the mouse pointer immediately and perform the new action when the mouse button is released.
Τροποποίηση | Συνάρτηση |
---|---|
Ctrl | Αντιγραφή |
Shift | Μετακίνηση |
Shift+Ctrl | Δημιουργία συνδέσμου, συντόμευσης ή ψευδωνύμου |
10.1.3.1.2. Μεταφορά ερωτήματος
Allow the user to drag objects with the Alt . Pop up a menu when the mouse button is released, offering the choice of , and (or whichever subset of those actions is available), and . Dragging in this way is known as query drag because it prompts the user before changing anything.
, or with10.1.3.2. Δείκτες ποντικιού για μεταφορά κι απόθεση
Use the default GTK drag and drop pointers for the standard transfer operations listed below. This consistency helps ensure the user will know exactly what to expect when they release the mouse button. If you have to design a pointer for a non-standard transfer action not listed here, follow the style of the standard pointers.
Σχήμα δείκτη | Σημασία |
---|---|
![]() |
Move selection. The dragged selection will be moved to the drop location, removing it from its previous location. |
![]() |
Copy selection. The dragged selection will be copied to the drop location, leaving the original intact. |
![]() |
Link selection. A link to the selection will be inserted at the drop location. How the link appears will be application-dependent, it may be a hyperlink, an icon, or a duplicate of the orignal selection, for example. |
![]() |
Middle button or Alt-left button drag. A pop-up menu will be posted at the drop location to ask whether the user wants to Move, Copy, or Link the selection, or Cancel the operation. |
![]() |
Αδύνατη η μεταφορά εδώ. Εμφανίστε αυτό το δείκτη ενώ το ποντίκι διέρχεται πάνω από μία περιοχή όπου η επιλογή δεν μπορεί να μεταφερθεί. |
10.1.4. Διάδραση ποντικιού με εφαρμογές του πίνακα εφαρμογών (Μικροεφαρμογές)
Όλα τα αντικείμενα στην επιφάνεια εργασίας πρέπει να συμπεριφέρονται με συνέπεια. Παρά την ειδικευμένη χρήση τους, οι μικροεφαρμογές δεν αποτελούν εξαίρεση.
-
The unmodified left mouse button must be sufficient to operate all your applet's controls. Applets are meant to be simple enough that modified clicking, or clicking with other mouse buttons (except to pop up the applet's menu) is never required.
Clicking the right button anywhere within the applet's enclosing window must display either the popup menu for the whole applet, or the popup menu for the control under the mouse pointer. Do not have "dead areas" in your applet that do not respond to a right click.
-
Do not use the middle button for anything except dragging the applet to a new location. Middle-clicking and dragging anywhere within the applet window must move the applet, do not require a drag bar or similar device.
Ctrl+ drag should copy the applet, if moving to another panel; unmodified drag or Shift+ drag should move the applet, if moving to another panel. If moving within same panel, Ctrl=switched movement, Shift=push movement, Alt=free movement.