text: aspects of the present invention relate to user input to electronic devices , and in particular , to a hollow cavity or a recessed cavity provided in a device housing separate from the device display operable to detect user input gestures performed in the cavity . the input gestures may be one - finger gestures , such as sliding a finger , or multi - finger gestures , such as a two - finger rotation , a two - finger pinch or a two - finger spread . the present invention further provides a light - based user interface that detects position and orientation of an object inserted within the cavity , which has application to three - dimensional touch recognition and to three - dimensional modeling , as described hereinbelow . the invention is described with regard to light based detection apparatus but other detection methods , such as acoustic methods , are also within the scope of the invention . for clarity of exposition , throughout the present specification , the term “ emitter ” is used as a generic term to refer to a light emitting element , including inter alia a light - emitting diode ( led ), and the output end of a fiber optic or tubular light guide that outputs light into a lens or reflector that directs the light over a display surface or into a cavity . the term “ receiver ” is used as a generic term to refer to a light detecting element , including inter alia a photo diode ( pd ), and the input end of a fiber optic or tubular light guide that receives light beams that traversed a display surface or cavity and directs them to a light detecting element or to an image sensor , the image sensor being inter alia a charge coupled device ( ccd ) or a complementary metal oxide semiconductor ( cmos ) image sensor . according to embodiments of the present invention , a subsystem is provided as a complement to a touch screen display , providing new types of user interaction , as well as many functionalities provided by a mouse input device but absent in finger - based touch screens . physically , the device contains a display with a touch sensor combined with a fixed or foldable complementary optical sensor that allows items to be tracked inside an open frame . the open frame may be integrated into the device in a fixed manner , or as a foldable frame . prior art display touch sensors provide 2 + 1 input dimensions , i . e ., x , y and z , where z is typically only a binary dimension to distinguish touch from non - touch , although limited continuous dimension sensing is technically possible . using a z dimension on a touch screen has a disadvantage in that the further away from the xy plane the finger is located , the more of the display image is covered from visibility , due to the parallax effect between the eye and the display . when combined with the user input cavity of the present invention , a touch screen is used for item selection , in a manner similar to ordinary user interface ( ui ) solutions . the user input cavity subsystem of the present invention provides extra dimensions of user input for context interaction with the item selected on the touch screen . one such interaction is an object selected on the touch display with one hand , and then changed in appearance though the user input cavity with the other hand . this combination provides a unique user input experience and makes user interaction more efficient . it also enables restoring mouse input functions by mimicking scroll wheel functions , right - or middle - button clicks , as well as combined control - button and clicks . according to embodiments of the present invention , a user input cavity for detecting user gestures is provided in a device housing separate from the device display . reference is made to fig1 , which is a simplified illustration of a device having a cavity for finger gesture user input that uses light - based detection , and a finger performing a translation gesture therein , in accordance with an embodiment of the present invention . fig1 shows an electronic device 826 having a display 635 and a hollow user interface cavity 850 contained in a housing 827 . cavity 850 penetrates two opposite sides of housing 827 . a finger 900 is shown performing a translation gesture — sliding along the length of cavity 850 , as indicated by the arrow inside cavity 850 . cavity 850 includes one or more emitters , including inter alia infra - red or near infra - red light - emitting diodes ( leds ), and a plurality of receivers , including inter alia photo diodes ( pds ), arranged along the cavity perimeter . reference is made to fig2 , which is a simplified illustration of device 826 with both display 635 and cavity 850 using light - based detection , in accordance with an embodiment of the present invention . fig2 shows two stacked rows of emitters and receivers surrounding the perimeter of cavity 850 . reference is made to fig3 , which is an enlarged view of the lower left portion of device 826 , in accordance with an embodiment of the present invention . the lower left corner of device 826 , where emitters 200 and receivers 300 are situated , is magnified in fig3 . emitters 200 project light into cavity 850 , and the light is detected by receivers 300 . an object , such as a finger or a stylus , inserted into the cavity blocks some of the light beams , and correspondingly some of receivers 300 detect less light intensity . the geometry of the locations of receivers 300 , and the light intensities they detect , suffice to determine cavity - space coordinates of the inserted object . emitters 200 and receivers 300 are controlled for selective activation and de - activation by a controller . generally , each emitter 200 and receiver 300 has i / o connectors , and signals are transmitted to specify which emitters and which receivers are activated . the user input cavity detectors determine a euclidean space aligned to the plane bound by the input cavity frame , and extending along the normal of that plane . depending upon the mechanical design , this space is oriented differently relative to the space defined by the display plane and its normal . the coordinates of the user input cavity space are denoted x , y and z , and the rotational angles around these axes are denoted α , β and γ , respectively . the two finger distance scalar ( grip ) is called the s coordinate . these coordinates are now described . table i summarizes the input coordinates provided by the cavity subsystem . table i does not include the display touch subsystem . the x and y coordinates are along the plane bound by the cavity frame edges . these coordinates accurately cover the area bounded by the edges . the z coordinate extends along the normal of the plane bound by the cavity edges , in effect measuring how far an object is inserted into the cavity . detection along the z dimension is accurate within a small range defined by the distance between the sensing layers . detection within the accuracy range is based upon the differential of the signal level of the two sensing layers . reference is made to fig4 and 5 , which are simplified diagrams of light based detection of an object lowered into a user gesture input cavity using stacked rows of emitters and receivers , in accordance with an embodiment of the present invention . white receivers detect expected light , and black receivers are blocked by an inserted object . fig4 and 5 show how to determine depth relative to a z - axis . fig4 shows the detection pattern of receivers when a finger is inserted into the upper portion of the cavity . fig5 shows the detection pattern of receivers when a finger is inserted through the cavity . the α and β angles are rotational and extend around the x and y axes , respectively . accuracy is related to the distance between the sensing layers and is generally less sensitive to smaller angles towards the xy plane normal . the rotational extension is more limited by human anatomy than by the sensor . there is a theoretical gap in detecting small angles relative to the xy plane , and the frame edges themselves also set a limit below ± 90 °. sensing is done by calculating the angle between the detection points of the sensing layers . reference is made to fig6 - 8 , which are simplified diagrams of rotation detection around a y - axis , in accordance with an embodiment of the present invention . fig6 shows a detection pattern of receivers when a finger inserted into the cavity is tilted in one direction around the y - axis . fig7 shows the detection pattern of receivers when a finger inserted into the cavity is upright . fig8 shows the detection pattern of receivers when a finger inserted into the cavity is tilted in a second direction around the y - axis . reference is made to fig9 - 11 , which are simplified diagrams of rotation detection around an x - axis , in accordance with an embodiment of the present invention . as such , when a single finger is inserted into the cavity , five user input coordinates are determined ; namely , x , y , z , α , and β . when two fingers are inserted into the cavity , two additional input coordinates are determined ; namely , γ and s , thus providing a total of 7 input coordinates . the s coordinate is a scalar and is defined by the distance between the two fingers inserted into the user input cavity . accuracy of the s coordinate is high for all positive values ; however , it is difficult to distinguish a zero value from a single finger . sensing is done by calculating the distance between the x and y coordinates of the two fingers . the γ dimension is rotational and extends around the z axis . it is only available in two - finger mode . accuracy is high except for very small s values . extension is unlimited , that is , sensing can be done for an infinite rotation . sensing is done by calculating an angle based upon the x and y deltas between the two fingers . reference is made to fig1 , which is a simplified diagram of a rotation gesture around a z - axis , whereby a user places two fingers on the screen and rotates them around a central point . input from the cavity subsystem is preferably utilized according to the extent and accuracy of the different coordinates . the accuracy of x , y , γ , and s is of advantage for continuous object manipulation , such as translation , rotation and scrolling . the lower accuracy coordinates are of advantage for additional functionality , such as menu navigation . from a user perspective this is easily understood ; namely , ( i ) sweep one finger to scroll , ( ii ) tilt an inserted finger to open a pop - up menu , and ( ii ) use two fingers to manipulate objects , such as resizing and rotation . the number of fingers inserted into the input cavity acts as an intuitive mode setting . for example , one finger may scroll and select menus , and two fingers may manipulate objects . in some embodiments the low - resolution coordinates α , β and z are used in combination for quick single - finger gestures to invoke transient commands , in a “ tilt - and - insert ” manner . using all combinations of α , β and z would complicate the ui . therefore , a balanced scenario limits the possibilities . for example , insert a straight finger to enable scrolling , and insert a tilted finger to mimic a mouse right - click , say , to open a context - sensitive menu . table ii summarizes the user cavity input coordinates , appropriate gestures for each coordinate , and examples of ui functions . in an embodiment of the present invention , plural emitters are arranged along two adjacent sides of a rectangular cavity , and plural receivers are arranged along the other two adjacent sides . reference is made to fig1 , which is a simplified illustration of a device having a cavity for finger gesture user input that uses light - based detection , in accordance with an embodiment of the present invention . fig1 shows a device 826 having a display 800 and a user gesture input cavity 850 . cavity 850 is surrounded with emitters 200 and receivers 300 . emitters 200 emit infra - red or near infra - red light beams into cavity 850 , which are detected by corresponding receivers 300 that are directly opposite respective emitters 200 . when an object is inserted into cavity 850 , it blocks light from reaching some of receivers 300 . by identifying , from the receiver outputs , which light beams have been blocked by the object , the object &# 39 ; s location is determined . an emitter - receiver controller 776 , connected to emitters 200 and receivers 300 , coordinates activation of these elements and stores the receiver outputs . a calculating unit , included in controller 776 or in communication with controller 776 , reads the receiver outputs and determines therefrom the presence and location of an inserted object . a processor 770 ( shown in fig3 ) connected to emitters 200 and receivers 300 and to display 635 , causes display 635 to render a visual representation in response to output from receivers 300 . reference is now made to fig1 , which is a simplified diagram of device 826 detecting a first inserted object , in accordance with an embodiment of the present invention . fig1 shows device 826 detecting a finger 900 inserted into cavity 850 . finger 900 blocks light from reaching some of receivers 300 , marked as receivers 2 and 9 . in accordance with an embodiment of the present invention , the location of finger 900 is determined from the crossed lines of the infra - red beams that the finger blocks . the receivers are numbered 1 - 9 , from left to right . however , only blocked receivers are marked . reference is now made to fig1 , which is a simplified diagram of device 826 detecting two inserted objects , in accordance with an embodiment of the present invention . fig1 shows device 826 detecting two fingers 900 and 901 inserted into cavity 850 . finger 900 blocks light from reaching receivers 2 and 9 , and finger 901 blocks light from reaching receiver 6 . in accordance with an embodiment of the present invention , the locations of fingers 900 and 901 are determined from the crossed lines of the infra - red beams that the fingers block , whereby the blocked receivers are separated by unblocked receivers . this indicates two separate insertion points . reference is now made to fig1 , which is a simplified illustration of a cavity for finger gesture user input detecting a two - finger pinch gesture , in accordance with an embodiment of the present invention . fig1 shows input cavity 850 detecting a two - finger pinch gesture . cavity 850 in shown twice to illustrate changes in blocked receivers over time . the pinch gesture of fig1 begins with receivers 2 and 6 being blocked , as shown in the upper diagram . as fingers 900 and 901 are brought closer together receivers 3 and 5 are blocked , as shown in the lower diagram . the direction of the pinch gesture is thus determined from changes in blocked receivers 300 . the pinch gesture is indicated by two facing arrows beneath the lower diagram . reference is made to fig1 , which is a simplified illustration of a cavity for finger gesture user input detecting a two - finger spread gesture , in accordance with an embodiment of the present invention . fig1 shows a two finger spread gesture , which is an opposite of a two - finger pinch gesture . cavity 850 in shown three times to illustrate changes in blocked receivers over time . the spread gesture of fig1 begins with receivers 4 and 5 being blocked , as shown in the upper diagram . as fingers 900 and 901 are spread apart , the distance between the blocked receivers increases . thus , receivers 3 and 5 are blocked in the middle diagram , and receivers 2 and 6 are blocked in the bottom diagram . the direction of the spread gesture is thus determined from changes in blocked receivers 300 . the spread gesture is indicated by two outward - facing arrows beneath the bottom diagram . in many devices today a pinch gesture performed on a touch screen activates a zoom - out function on the displayed screen image , and a spread gesture performed on a touch screen activates a zoom - in function on the displayed screen image . the present invention enables performing these gestures in cavity 850 without blocking the user &# 39 ; s view of the image on the screen . the problem of obstructing the user &# 39 ; s view is especially acute in conventional devices where pinch and spread gestures are performed along a screen diagonal , as the user &# 39 ; s hand blocks a large portion of the screen in such cases . according to certain embodiments , translating a single finger in a first direction along cavity 850 corresponds to a conventional pinch gesture on the touch screen , and translating a single finger in the opposite direction along cavity 850 corresponds to a conventional spread gesture on the touch screen . this simplifies the gesture and allows easy adaptation of existing application software to devices of the present invention , whereby the user gesture input cavity driver sends a message equivalent to a pinch or spread gesture to the host processor or application software . it is evident from fig1 - 17 that the receiver along the narrow edge of cavity 850 is blocked when a finger is inserted in the cavity . this is a result of the narrow shape of the cavity . thus , input gestures are distinguished from one another on the basis of detectors along only one edge . therefore , in some embodiments using narrow cavities , or otherwise requiring detection in only one dimension , emitters and receivers are provided along the longer cavity edge , but not along the narrow edge . it is not necessary to detect the inserted finger along the narrow edge because it is not important where along the second edge the finger is inserted ; it is only important to know where the one or more fingers are inserted along the longer edge and what gesture they perform relative to that edge . alternatively , in such cases one emitter - detector pair is provided on the narrow cavity edge and this is used to determine if a finger is inserted at all . this saves power , as compared with the power required to pulse a plurality of emitters along the longer edge . once a finger insertion is detected , only the emitter - detector pairs along the longer edge are activated to determine the exact nature of the user gesture . in fig2 and 3 light emitters 200 are arranged in layers along at least one wall of cavity 850 , and emit light pulses into the space of cavity 850 . light receivers 300 are arranged in like layers along an opposite wall of cavity 850 , and detect the emitted light pulses when the cavity space is empty , but when object 900 is inserted into cavity 850 it blocks a portion of the emitted light pulses from arriving at receivers 300 . as such , processor 770 is able to detect the presence of an object in cavity 850 and the depth at which the object is inserted into cavity 850 , based on outputs of receivers 300 in the different layers . when a finger is inserted into cavity 850 it is first detected by receivers 300 in the upper layer . when the finger proceeds deeper inside cavity 850 , it is detected by receivers 300 in the upper and lower layers . the time between the first upper layer detection and subsequent lower layer detection is used to determine the downward velocity of the object into the cavity . this is a useful attribute of the user interface as it enables the system to distinguish a hard or fast insertion from a slow or soft insertion . such information is useful , for example , in gaming environments that support varying degrees of force applied to an avatar &# 39 ; s actions , or in artistic paintbrush rendering where the force of the brushstroke altars its thickness . a speed of removal of the object from the cavity is similarly calculated by determining the interval between detecting the removal of the object in the different layers . another advantage of multiple stacked layers of emitters and receivers is that it enables determining an angle of approach through the cavity and also a standing angle of the object inside the cavity . one use for this information is to enable user gestures of inserting a finger and tilting it in various directions . for example , to scroll a document a user inserts his finger and tilts it forward without moving the bottom of his finger to scroll . the degree of tilt sets the scrolling speed . another advantage of multiple stacked layers of emitters and receivers is that it enables detecting the two or more touches in a multi - touch in an order . multiple concurrent touches , such as two diagonally opposed touches are ambiguous because the detection pattern of receivers is substantially the same for both cases of diagonal touches , i . e ., concurrent upper - left and lower - right touches generate the same pattern of blocked receivers as concurrent upper - right and lower - left touches . when one touch is actuated slightly before the second touch , this can be used to disambiguate the touch pattern . for example , if the first detected touch is unambiguously determined to be at the lower left corner , then the subsequent second touch must be at the upper right corner . in a system with multiple stacked layers of emitters and receivers , each layer provides an opportunity to detect the insertion one finger before another , increasing the likelihood that this is detected . reference is made to fig1 , which is a simplified illustration of a device having a cavity for finger gesture user input that uses light - based detection and a finger inserted therein , in accordance with an embodiment of the present invention . fig1 shows the light - based user interface of fig1 - 3 , with object 900 lowered into cavity 850 . reference is made to fig1 , which is a simplified illustration of a device having a cavity for finger gesture user input that uses light - based detection and a finger lifted therefrom , in accordance with an embodiment of the present invention . fig1 shows the light - based user interface of fig1 - 3 , with object 900 raised from cavity 850 . according to further features of the invention , a device includes both a user gesture input cavity and a touch sensitive display . this allows for combination gestures where a user performs a gesture on the screen and a gesture in the cavity . in this regard , reference is made to fig2 and 21 , which are simplified diagrams of user input combining a touch screen gesture and an input cavity gesture , in accordance with an embodiment of the present invention . fig2 and 21 show the light - based user interface of fig1 - 3 , used in conjunction with a touch screen display 635 . in fig2 an image is displayed on the screen . a user desires to zoom the image . in conventional systems a zoom function automatically zooms in on the center of the displayed portion of the image . in order to zoom in on a different portion of the image in a conventional system , the user needs to pan the image so that it is centered at a desired location and then perform a zoom gesture , typically a pinch or spread gesture . in fig2 the user selects a center for zooming by touching a desired picture element while performing a zoom gesture in the user gesture input cavity . the result , shown in fig2 , is the zoomed image centered around the touched location . in certain cases , the user selects a screen object by tapping on it . a subsequent resize operation , executed in response to a gesture in the cavity , is executed when the user is not touching the screen . the resize operation centers the resized image on the selected object . in other cases , the user pans the image by dragging a finger on the display while performing a gesture in the input cavity to resize the image . thus , the resize and pan occur at the same time and the user controls both operations . reference is made to fig2 , which is a simplified diagram of a device having a display and a user input cavity connected by a hinge , whereby the display is upright and supported by the cavity , in accordance with an embodiment of the present invention . fig2 shows a left - hand finger 900 touching the display , while two right - hand fingers 902 and 903 are inserted into the user cavity . reference is also made to fig2 and 24 , which are simplified diagrams of the device of fig2 where the cavity is folded onto the display , in accordance with an embodiment of the present invention . fig2 - 24 show a light - based user interface for an electronic device that has a display 635 within one section of the housing , and a cavity 850 within another section of the housing . these two sections are connected by a hinge 835 that enables folding the sections onto each other . display 635 is mounted in the first section , and cavity 850 is located within the second section . the frame around cavity 850 fits along the edges of the first section when the sections are folded . by aligning the user input cavity frame and the display unit on the same plane with a centered shaft near one of the edges , the frame can be rotated continuously relative to the display . this provides flexibility and makes the unit robust , as a user is not restricted by the extent to which the frame can be opened . by making the user input cavity frame slightly thicker than the display unit , the sensing layers of the frame enclose the display unit when folded . by using collector rails ( not shown ) at the two shafts in hinge 835 that lock the display unit to the user input cavity frame , there are no wires that get twisted , and the user input cavity frame may rotate continuously around hinge 835 . at least two collectors are used for power feed . control and touch event data are superimposed on the power signals , or have their own collector rails . reference is made to fig2 and 26 , which are simplified illustrations of a device with a light - based user interface that detects depth of a finger relative to a touch screen when a housing of the device is folded , in accordance with an embodiment of the present invention . the device display is a touch screen 860 . when a hollow frame 850 is folded onto touch screen 860 , multiple layers of touch detection are provided ; namely , a higher layer provided by the emitters and receivers surrounding the hollow frame , and a lower layer provided by the touch screen . in fig2 , hollow frame 850 is surrounded by two stacked layers of emitters , 202 and 203 , and receivers , 302 and 303 . in other embodiments , only one layer of emitters and receivers is provided . touch screen 860 is surrounded by one layer of emitters 201 and receivers 301 . however , the touch detection technology used for touch screen 860 may be any technology , such as resistive or capacitive , instead of light - based . when the hollow frame is folded onto the display , the hollow frame bezel is slightly raised above the touch screen , to provide object detection above the display . fig2 , showing the folded frame , includes a 3d touch screen 861 . fig2 shows that when the frame is folded onto the screen , the screen is surrounded by three stacked layers of emitters 201 - 203 and receivers 301 - 303 , at different heights above the display . reference is made to fig2 , which is a simplified diagram of the device of fig2 where the cavity is placed alongside the display , in accordance with an embodiment of the present invention . reference is also made to fig2 and 29 , which are simplified diagrams of the device of fig2 where the cavity is folded onto the back of the device , in accordance with an embodiment of the present invention . fig2 shows an open device with a cavity 850 alongside a touch screen 860 joined by a hinge 835 . fig2 shows folding of cavity 850 onto the back of touch screen 860 . fig2 shows the folded frame , touch screen 860 on the front side of the device , and touch sensitive back 862 of the device . fig2 shows the folded frame twice . in the upper portion of fig2 , the device is shown with touch screen 860 and touch sensitive back 862 of the device . in the lower portion of fig2 , a left - hand finger 900 is touching the touch screen while a right - hand finger 902 engages the touch sensitive back of the device . fig2 shows the open device with cavity 850 alongside touch screen 860 joined by hinge 835 . in this unfolded operating mode the user input cavity is separated from the display unit and aligned with the extended display xy plane , or aligned at an angle thereto . the user input cavity subsystem provides the 7 user coordinates described hereinabove . the angle of the user input cavity frame that is most convenient may be adjusted by the user . typically , a user selects an object using the display touch , and then uses the user input cavity to manipulate the selected object . folding the user input cavity frame towards or away from the user may depend upon the use case . some use cases are as follows . when holding the unit in the air , convenience is achieved with the input cavity frame approximately 45 ° towards the user , or folding it 90 ° away from the user . when the unit is resident on a table , the display may be placed flat on the table and the user input cavity frame can be positioned straight up at an angle of 90 °. alternatively , with the device resident on a table , the user input cavity frame can also be completely folded out to form a continuation of the display plane . yet another alternative is that the frame doubles as a support for an upright display , as illustrated in fig2 . moving along the z axis in a 3d realm has always been a challenge using 2d input devices . when using a mouse , the scroll wheel and / or right - click plus y movement have become standard methods of manipulating objects in the z dimension . neither of these methods are available when using a touch screen . aligning the user input cavity frame along the yz plane , e . g ., by standing the frame upright on the right side on a horizontal display , renders the cavity &# 39 ; s y coordinate an intuitive z movement control for a 3d ui . moreover , user gestures in the cavity do not obstruct the user &# 39 ; s view of the display , which a z movement of a finger on top of the display would obstruct . reference is made to fig3 , which is a simplified illustration of a device 826 having a cavity for finger gesture user input that uses light - based detection , formed as a handle for carrying the device , in accordance with an embodiment of the present invention . touch sensitive cavity 850 forms the handle , and the device detects finger gestures within the handle . reference is made to fig3 , which is a simplified illustration of a device having a retractable frame that , when opened , forms a cavity for finger gesture user input that uses light - based detection , in accordance with an embodiment of the present invention . fig3 shows a touch screen 860 and a user interface cavity 850 that detects finger gestures . cavity 850 is formed by extending retractable three - sided frame 863 . an arrow 864 indicates the extension - retraction path of frame 863 . reference is made to fig3 , which is a simplified illustration of a device having a cavity for finger gesture user input that rotates around a hinge , in accordance with an embodiment of the present invention . fig3 shows a display 635 and a user interface cavity 850 that detects finger gestures . cavity 850 is formed by a frame 863 that is connected to the device by a rotatable hinge 835 . aspects of the present invention include an architecture for integrating a user interface gesture cavity into the android ® operating system . similar architectures are used for other operating systems . the android launcher is the initial ui from which a user activates applications . the launcher is activated when the user presses a “ home ” button . android provides a standard launcher , and there are many third party launchers . many device vendors provide their own launcher . aspects of the present invention include an android ui that supports features provided by the present invention ; namely , a touch input cavity separate from the screen , and touch information regarding the screen &# 39 ; s z - plane , beyond the binary touch / no - touch information provided by conventional touch screen devices . in general , android launchers provide a workspace divided into multiple screens . the user switches between the different screens , typically by performing a sideways sweep gesture , i . e ., by gliding a finger across the width of the screen . a certain area of the workspace is fixed so that it does not switch with the screens . this fixed area , often called a “ dock ”, contains icons for launching popular applications , e . g ., a dialer , a program drawer , and an internet search . the workspace has a background shared by all screens that typically slides in sync with the screen switches . each screen holds widgets , shortcuts , folders and live folders , which are real - time views on the screen of a content provider . a live folder displays data from a source without forcing the user to launch an application . as such , a live folder may be used to display contacts , bookmarks , email , playlists , and rss feeds . screens usually have a grid layout , so that icons and widgets cannot be placed at any arbitrary position . performing a long hold on an item on any screen switches mode so that the item can be moved , or dragged to a “ trash bin .” performing a long hold on an empty portion of a screen opens a menu for a user to select new items to be added to the screen . the launcher also provides an application “ drawer ,” which is opened from any screen and contains a list of all installed applications as labels or icons . typically the list is in the form of a scrollable list or a multi - page grid . performing a long hold on an application label or icon within the application drawer switches to a mode where the application can be placed on any screen . to summarize , a launcher must be able to handle widgets , live folders and application startups , and should be able to handle user folders , shortcuts and wallpaper . the workspace in most launchers is divided into screens containing shortcuts , widgets , folders and live folders . the workspace in an embodiment of a launcher for the present invention is conceptually configured in the 3d realm , with the workspace screens being distributed among various objects , surfaces or virtual rooms that provide logical grouping of items . the launcher ui is manifested as a scene graph which can be modeled in 2d or 3d . in an embodiment of the present invention , the launcher contains wallpaper as a background image for the 3d realm , although there are differences between the type of image appropriate for 3d backgrounds and 2d wallpapers . in most cases , the outlook of the 3d background is sufficiently different from desktop wallpaper that it is handled as a separate entity in the design process . in embodiments of the invention where the user interface gesture cavity rotates or slides around the display screen to provide an additional layer of input that is mapped onto the screen , the android desktop ui supports two different modes ; namely , closed and open . in closed mode the user interface gesture cavity surrounds the display screen to provide an additional layer of input that is mapped onto the screen . in open mode the cavity is separate from the screen . in open mode , the device receives multi - dimensional input from two separate subsystems ; namely , from the screen and from the cavity . in closed mode , there is only one input ; namely , touches the user performs on the screen . these touches are detected both by the screen and by the cavity . various architectures for user interface ( ui ) representations are based upon similar concepts ; namely , a graph of data objects representing a current structure of a ui , often referred to as a “ model ”, which is rendered graphically on a screen in what is referred to as a “ view ”. nodes in a data object graph represent static and interactive ui objects , such as text , images , buttons and checkboxes . different graphical representations of the same data object graph may exist simultaneously . various implements for a ui model are in use . for web browsers and for many word processors , the structure of a ui is a document object model ( dom ), for android ™ the structure is a “ view tree ”, and for flash ® the structure is a “ scene ”. the underlying concept is the same , regardless of hardware platform , operating system , runtime environment and programming language . many platform vendors impose a preference for the ui model that is used . in an android ™ environment , the programmer is recommended to use a set of xml files , called “ application resources ”, to describe the ui model , and to use the java ® programming language , which is compiled into byte code for the dalvik ® runtime engine . however , developer requests led to the capability of using native c code for the programming language , through the native development kit ( ndk ), and of using scripting languages , through the scripting layer sla4 for android ™. aspects of the present invention are applicable to any platform , model , programming environment and runtime environment . in accordance with an embodiment of the present invention , the ui data object graph is manipulated at run - time , based upon user events generated by a user input cavity . the data object graph representing the ui is generally inflated from a textual representation . inter alia , for web browsers , the inflated form may be an html document , for word browsers , the inflated form may be an ooxml document , and for silverlight ®, the inflated form may be an xaml document . in addition to being inflated from a document , the data object graph may be manipulated in response to events in a running application such as a web browser , a document editor and a desktop , such as in response to an event when a user uses a keyboard or pointer to interact with the ui . aspects of the present invention relate to manipulating the ui model . the user interface cavity interacts with the ui through a processing chain similar to other input devices , such as a touch screen , a mouse and a keyboard . namely , a low level device driver captures raw events from the user input cavity and dispatches them via the operating system into the running application , which in turn interprets them and applies appropriate modifications to the ui model . in accordance with an embodiment of the present invention , user interaction with the ui model includes inter alia the following actions . moving — in response to moving , the scope of the current view , i . e . the visible part of the ui model , is changed ; e . g ., scrolling in a document , and switching between different desktop screens in an android ™ launcher . selection — in response to selecting , a specific object or group of objects is selected for further actions ; e . g ., selecting a file icon , and selecting a group of words in a text editor . manipulation — in response to manipulation , a previously selected object or group of objects is changed ; e . g ., rotating a selected image in a drawing program , and making selected text bold in a word processor . transfer — in response to transfer , a previously selected object or group of objects is moved to a new location within the ui model , or transferred to another model for another program , or transferred to another model at another device ; e . g ., dragging - and - dropping an object within a document , and moving a selected file to a new folder . the user input cavity recreates input events that are used in a conventional pc environment , which normally are actuated by input methods that are not available for touch - based interfaces , including inter alia modifier keys ( ctrl , alt ), additional mouse buttons and scroll wheels . it is not required to modify program code of target applications to support such events , since an intermediate device driver layer may translate user input cavity events to events that are familiar to the target application . examples include inter alia zoom , cut & amp ; paste , scrolling and opening context menus . as such , third party applications can incorporate that user input cavity of the present invention without modification . moreover , the user input cavity of the present invention generates a variety of novel types of user input events including inter alia three - dimensional manipulation of objects , as described hereinbelow . to support such events , specific application code is required ; i . e ., existing applications require modification . the event handler of the application code listens for events from standard input devices , in parallel with the user input cavity , and manipulates the ui model in accordance with patterns that correspond to the new features . various options are available for writing new applications that use the novel input patterns provided by the user input cavity of the present invention . in an all java ® model , the full application is written in the java ® programming language and compiled to the dalvik ® framework . this is a conventional way of generating android ™ applications , but it imposes two major drawbacks ; namely , performance and flexibility . an alternative model combines java ® and c . in this model , the program logic is written in java ® and the time - critical parts are written in c , exposed to the java ® layer via the java ® native interface ( jni ). this enables performance improvements , and is a good way to start a project , as code can be ported from the java ® layer to the c layer on demand . yet another alternative model combines java ®, scripting and c . in this model too , the program logic is written in java ® and the time - critical parts are written in c , but the dynamic parts of the application are written in a scripting language hosted by the java ® layer , such as python ®, ruby or javascript ®, and interpreted at runtime . this improves flexibility during development , as small changes may be made without recompiling and reinstalling the application . a different model uses only scripting and c . this is an approach where the application appears as a native application with no java ™ layer , and the dynamic parts are handled by a scripting layer that communicates with the application through a remote procedure call ( rpc ). this is a complex , yet very flexible model , which is commonly used in gaming . the launcher ui is manifested as a scene graph modeled in 2d or 3d . there is no connection to the system of ui definitions as android ™ resource files ; everything is contained in a single view . reference is made to fig3 , which is a simplified flow diagram illustrating how a launcher user interface is rendered , in accordance with an embodiment of the present invention . fig3 shows how the launcher ui is handled within only one glsurfaceview , which uses a renderer to render the full launcher ui scene . the finger gesture user interface of the present invention is of widespread advantage in many different applications . inter alia several of these applications are described in what follows . in accordance with an embodiment of the present invention , the object inserted into the cavity is two fingers , and the user interface distinguishes between four mufti - finger gestures performed in said cavity ; namely , ( i ) clockwise rotation , ( ii ) counter - clockwise rotation , ( iii ) finger pinch , and ( iv ) finger spread . in accordance with an embodiment of the present invention , the display is a stereoscopic viewport , which renders a graphic being rotated in three dimensions in response to an object being inserted in the cavity . in accordance with an embodiment of the present invention , the display pans an image or scrolls a document or a list in response to a one - finger gesture , and zooms an image , or rotates an object or opens a file in response to a two - finger gesture . in accordance with an embodiment of the present invention , the display renders animated navigation of snapshots of widgets , documents , web page bookmarks , album artwork or photographs in response to a translation gesture ; and renders opening of a widget , a document , a web page , an album or a photograph in response to a two - finger gesture . in accordance with an embodiment of the present invention , the display renders fast animation of snapshots of widgets , documents , web page bookmarks , album artwork or photographs in response to a translation gesture ; renders slow animation thereof in response to a first two - finger gesture ; renders opening of a widget , document , web page , album or photograph in response to a second two - finger gesture ; and renders closing thereof in response to a third two - finger gesture . in accordance with an embodiment of the present invention , a cut and paste routine is provided . in this routine a user selects text or an object by touching the text or object on the display with one hand . the thumb and index finger of the other hand are then entered into the user input cavity frame , moved together in a pinch gesture and removed from the frame . this is the cut operation , figuratively grabbing the text or object . a target position for the cut object is marked by touching the display with one hand , then inserting the other hand with the thumb and index finger brought together into the user input frame , then bringing them apart in a spread gesture , which figuratively represents dropping the previously grabbed text or object into its new location . in accordance with an embodiment of the present invention , an application program defines a context , and a function related to the context is activated in response to a finger gesture . for example , the display renders a menu of context - relevant options in response to tilting a finger inside a cavity at an acute angle . in accordance with an embodiment of the present invention , the display renders an image , identifies a selected location within the image , and processes the selected location , in response to a finger gesture . in accordance with an embodiment of the present invention , the display is a touch screen display , and the user interface detects finger gestures on the touch screen and also finger gestures in a cavity . the display pans an image in response to a finger gesture on the touch screen , and resizes the image in response to a finger gesture in the cavity . the finger gesture on the touch screen is inter alia a finger translation , and the finger gesture in the cavity is inter alia a finger pinch or a finger translation . in accordance with an embodiment of the present invention , one or more objects are rendered , one of which is identified as being a selected object , and an application program processes the selected object , in response to a finger gesture performed in the user input cavity . for a first example , the selected object is selected text within a document , and the application program maintains the selected text at its location within the document and moves unselected text , thereby positioning the selected text at a different location within the document , in response to a finger gesture in the cavity . moreover , the selected text is fixed at the different location in response to a second finger gesture in the cavity . for a second example , the selected object is an icon , and the application program maintains the selected icon at its location on the display and moves unselected icons , thereby positioning the selected icon at a different location in the ui , in response to a finger gesture in the cavity . for example , in response to a user gesture in the cavity , inter alia a translation gesture , all unselected icons in the current android screen are graphically swept off the display and icons from a different screen are graphically swept onto the display . this situates the selected icon on a different android screen . moreover , the icon text is fixed at the different location in response to a second finger gesture , inter alia removing the user &# 39 ; s fingers from the cavity . for a third example , the selected object is an entry in a contact list , and the application program initiates a phone call to the selected entry in response to a first finger gesture in the cavity , and opens an sms dialog box addressed to the selected entry in response to a second finger gesture in the cavity . for a fourth example , the selected object is a selected time interval within a calendar , and the application program causes the calendar to increase or decrease resolution to present a respectively greater or lesser time interval centered around the selected time interval . for a fifth example , the selected object is a file , and the application is a file manager . the file manager presents properties of the selected file in response to an initial finger gesture in the cavity , and opens the selected file in response to an extension of the initial gesture . moreover , the file system has multiple levels of folders , and the file manager presents properties of a selected file in response to an initial gesture in the cavity , displays the selected file as an icon in its folder in response to an extension of the initial gesture , and displays the folder as an icon in its next level folder in response to a further extension of the initial gesture . for a sixth example , the selected object is a person within a social network , and the application program is a social network application . the application renders a first plurality of persons connected to the selected person in response to an initial gesture in the cavity , and renders a second plurality of persons connected to the first plurality of persons in response to an extension of the initial gesture . for a seventh example , the selected object is a song or an artist in a music library , and the application program is a music library manager . the music library manager renders a first plurality of songs related to the selected song or artist in response to an initial finger gesture in the cavity , and renders a second plurality of songs connected to the first plurality of songs in response to an extension of the initial gesture . for an eighth example , the selected object is a restaurant or hotel , and the application program is a reservation program for restaurants or hotels . the reservation program displays a plurality of restaurants or hotels similar to the selected restaurant or hotel in terms of style , cost , location or such other parameter ( s ), in response to an initial gesture in the cavity , and renders additional similar restaurants or hotels in response to an extension of the initial gesture . reference is made to fig3 , which is a simplified illustration of a three - dimensional modeling input system , in accordance with an embodiment of the present invention . the cavity within frame 863 is shown being lowered over a solid object , such as a coffee mug . this is indicated by the downward facing arrows . the series of detections executed by the frame as it is lowered are combined as 2 - d slices of the object to provide a 3 - d model of the solid object . an alternative embodiment reduces the number of components in the system by coupling an emitter or a receiver to one end of a long thin light guide situated along an edge of the cavity . such a light guide is described in u . s . pat . no . 7 , 333 , 095 to lieberman et al ., entitled illumination for optical touch panel . calibration of emitters and detectors for object detection is described in applicant &# 39 ; s co - pending u . s . application ser . no . 13 / 053 , 229 , entitled “ touch screen calibration and update methods ,” filed on mar . 22 , 2011 , published as us publ . no . 2011 / 0169781 a1 on jul . 14 , 2011 . aspects of the present invention relate to design and use of a programmable state machine to control both the user gesture input cavity and a light based touch screen in a single device . the controller executes a scanning program on the series of emitters and detectors in both the touch screen and in the user gesture input cavity . the scanning program determines scan sequence , current levels and pulse widths . by configuring the scan sequence registers , the host processor determines which led - pd pairs are activated . the controller thus sets activation for led - pd pairs surrounding the screen , for led - pd pairs in the user input gesture cavity , or for both . the host processor associates each led and each pd with either the screen or the cavity and processes its results accordingly . for example , touches on the screen require greater precision than the user gestures in the input cavity . therefore , detection results on the screen are filtered both temporally and spatially , whereas detection results in the input cavity are not filtered , or alternatively are filtered only spatially , optionally using a different set of filter coefficients . in addition , the scan sequence configuration registers enable configuring an oversampled activation sequence , inter alia activating each emitter with two detectors , and a one - to - one sequence , wherein each emitter is activated with only one detector . typically , the emitters and detectors around the user input cavity are aligned opposite one another . in some embodiments of the present invention , at least two sets of scan configuration registers are provided to enable configuring two different scan patterns ; namely , one set for emitters and receivers around the screen , and one set for emitters and detectors surrounding the user input cavity , to be executed in a single scan operation of the controller . in other embodiments scan sequences for the screen are configured and executed separately from scan sequences for the user input cavity . the controller includes integrated led drivers for led current control , integrated receiver drivers for photo detector current measurement , and an integrated a / d convertor to enable communication between the controller and a host processor using a standard bus interface , such as a serial peripheral interface ( spi ). in accordance with the present invention , a program is loaded onto the controller , e . g ., over spi . thereafter , scanning execution runs independently from the host processor , optimizing overall system power consumption . when the scan data are ready , the controller issues an interrupt to the host processor via an int pin . reference is made to fig3 , which is a simplified block diagram of an asic controller 776 for a light - based touch screen 860 and user input cavity 850 , in accordance with an embodiment of the present invention . controller 776 activates emitters 200 and receivers 300 that surround touch screen 860 and cavity 850 . reference is made to fig3 , which is a circuit diagram of a chip package 731 for a controller of a light - based touch screen and user input cavity , in accordance with an embodiment of the present invention . as shown in fig3 , chip package 731 includes emitter driver circuitry 740 for selectively activating a plurality of photoemitters 200 that are outside of the chip package , and signal conducting pins 732 for connecting photoemitters 200 to emitter driver circuitry 740 . emitter driver circuitry 740 is described in applicants &# 39 ; co - pending patent application u . s . ser . no . 12 / 371 , 609 entitled light - based touch screen filed on feb . 15 , 2009 , the contents of which are hereby incorporated by reference . inter alia , reference is made to paragraphs [ 0073 ], paragraphs [ 0087 ]-[ 0091 ] and fig1 of this application as published in u . s . publication no . 2009 / 0189878 a1 on jul . 30 , 2009 . emitter driver circuitry 740 includes circuitry 742 for configuring individual photoemitter pulse durations and pulse currents for each emitter - detector pair via a programmable current source . circuitry 742 is described in applicants &# 39 ; co - pending patent application u . s . ser . no . 13 / 052 , 511 entitled light - based touch screen with shift - aligned emitter and receiver lenses filed on mar . 21 , 2011 , the contents of which are hereby incorporated by reference . inter alia , reference is made to paragraphs [ 0343 ]-[ 0358 ] and fig9 - 101 of this application as published in u . s . publication no . 2011 / 0163998 on jul . 7 , 2011 . chip package 731 includes detector driver circuitry 750 for selectively activating a plurality of photo detectors 300 that are outside of the chip package , and signal conducting pins 733 for connecting photo detectors 300 to detector driver circuitry 750 . detector driver circuitry 750 includes circuitry 755 for filtering current received from photo detectors 300 by performing a continuous feedback bandpass filter , and circuitry 756 for digitizing the bandpass filtered current . circuitry 755 is described inter alia at paragraphs [ 0076 ], paragraphs [ 107 ]-[ 0163 ] and fig1 - 23b of the above - reference u . s . publication no . 2009 / 0189878 a1 . chip package 731 also includes detector signal processing circuitry 753 for generating detection signals representing measured amounts of light detected on photo detectors 300 . chip package 731 further includes i / o pins 736 for communicating with a host processor 772 , and conducting pins for connecting to a power source . chip package 731 further includes controller circuitry 759 for controlling emitter driver circuitry 740 and detector driver circuitry 750 . controller circuitry 759 communicates with host processor 772 using a bus standard for a serial peripheral interface ( spi ) 775 . chip package 731 further includes a chip select ( cs ) pin 737 for coordinating operation of controller circuitry 759 with at least one additional controller 774 for the light - based touch screen . the controller shown in fig3 packages all of the above mentioned elements within chip package 731 , ( i ) thereby enabling automatic execution of an entire scan sequence , such as 50 emitter - received pairs , and ( ii ) thereby storing the detection signals in a register array for subsequent analysis by host processor 772 . reference is made to fig3 , which is a circuit diagram for six rows of photo emitters with 4 or 5 photo emitters in each row , for connection to pins 732 of chip package 731 , in accordance with an embodiment of the present invention . the 11 lines led_row1 , . . . , led_row6 and led_col1 , . . . , led_col5 provide two - dimensional addressing for 30 photo emitters , although a first portion the photo emitters are physically arranged around two edges of touch screen 860 , and a second portion are physically arranged around input cavity 850 , as shown in fig3 . table iii shows how leds are mapped to led_row and led_col pins . more generally , an led matrix may include an m × n array of leds supported by m + n i / o pins on the controller . as such , an led is accessed by selection of a row and a column i / o pin . the controller includes push - pull drivers for selecting rows and columns . it will be appreciated by those skilled in the art that the row and column coordinates of the leds are unrelated to the physical placement of the leds and the push - pull drivers . in particular , the leds do not need to be physically positioned in a rectangular matrix . in an alternative embodiment of the controller of the present invention , current source drivers are used instead of push - pull drivers . in another embodiment of the controller of the present invention , some of the push - pull drivers are combined with current source drivers , and others of the push - pull drivers are combined with current sink drivers . when the controller of the present invention scans a series of emitter - receiver pairs , an led driver supplies an amount of current to an led in accordance with settings in led current control registers and led pulse length control registers . leds are selected for activation in accordance with settings in scan range registers . the scan range registers designate a first led to be activated along each screen edge and along the cavity edge , the number of leds to be activated along each edge , and the step factor between activated leds . a step factor of 0 indicates that at each step the next led is activated , and a step factor of 1 indicates that every other led is activated . thus , to activate only odd or only even leds , a step factor of 1 is used . step factors of 2 or more may be used for steps of 2 or more leds , respectively . an additional register configures the number of pds that are activated with each led . a value of 0 indicates that each led is activated with a single corresponding pd , and a value of 1 indicates that each led is activated with two pds . the number of pds activated with each led may be as many pd that are available around the touch screen . typically , the controller will activate separate scan sequences for the screen elements and for the cavity elements . these activations are differentiated by the index of elements included in each sequence . for example , elements 1 - 20 are screen leds , and elements 21 - 30 are cavity leds . the controller of the present invention automatically controls a mux to direct current to desired leds . the led mux control is set by scanning control registers . the controller automatically synchronizes the correct pd receiver when the drivers pulse the leds . twelve - bit adc receiver information is stored in pd data registers . upon completion of scanning , the controller issues an interrupt to the host processor , and automatically enters standby mode . in some touch screen configurations , screen - related emitters are shift - aligned with receivers , with emitters being detected by more than one receiver and being activated one or more times for each detecting receiver . for example , an emitter may be activated three times in rapid succession , and with each activation a different receiver is activated . moreover , a receiver is further activated during the interval between emitter activations to determine an ambient light intensity . in other touch screen configurations , screen - related emitters and receivers are aligned , but each emitter is detected by more than one receiver , and each emitter is activated separately for each detecting receiver . emitter - receiver activation patterns are described in applicants &# 39 ; co - pending patent application u . s . ser . no . 12 / 667 , 692 entitled scanning of a touch screen filed on jan . 5 , 2010 , the contents of which are hereby incorporated by reference . inter alia , reference is made to paragraphs [ 0029 ], [ 0030 ], [ 0033 ] and [ 0034 ] of this application as published in u . s . publication no . 2011 / 0043485 on feb . 24 , 2011 . in accordance with an embodiment of the present invention , the controller is a simple state machine and does not include a processor core , such as an arm core . as such , costs of controllers of the present invention are low . a light - based touch screen using a controller of the present invention costs less than a comparable capacitive touch screen , since a capacitive touch screen requires a processor core in order to integrate a large number of signals and calculate a touch location . in order to achieve a quick response time , a capacitive touch screen uses a dedicated processor core to calculate a touch location , instead of offloading this calculation to a host processor . in turn , this increases the bill of materials for capacitive touch screens . in distinction , light - based touch screens of the present invention use two neighboring receiver values to calculate a touch location along an axis , which enables the host to calculate a touch location and , consequently , enables use of a low - cost controller . in addition , devices according to the teachings of the present invention use resources efficiently by utilizing the same controller for both the touch screen and the user gesture cavity . the present invention has broad application to electronic devices with touch sensitive screens , including small - size , mid - size and large - size screens . such devices include inter alia computers , home entertainment systems , car entertainment systems , security systems , pdas , cell phones , electronic games and toys , digital photo frames , digital musical instruments , e - book readers , tvs and gps navigators . in the foregoing specification , the invention has been described with reference to specific exemplary embodiments thereof . it will , however , be evident that various modifications and changes may be made to the specific exemplary embodiments without departing from the broader spirit and scope of the invention as set forth in the appended claims . accordingly , the specification and drawings are to be regarded in an illustrative rather than a restrictive sense .