An electronic device comprising: a touchscreen; at least one processor electrically connected with the touchscreen; and a memory electrically connected with the processor , wherein the memory stores instructions executed, when the electronic device is operated in a landscape mode, to enable the at least one processor to: display a first window , on a left-hand of the touch screen, for running a first application and a second window , on a right-hand of the touchscreen, for running a second application on the touchscreen, display a virtual keypad on a portion of the first window and a portion of the second window corresponding to a first input to a text entry window of the second window , receive a drag input starting from a side of the virtual keypad toward a boundary of the first window and the second window , wherein a horizontal size of the virtual keypad is reduced according to the drag input, identify a length of the drag input is greater than or equal to a designated threshold, based on the identification, display the virtual keypad on a lower portion of the second window , wherein the horizontal size of the virtual keypad displayed on the second window and a horizontal size of the second window are identical to each other. a touchscreen; at least one processor electrically connected with the touchscreen; and a memory electrically connected with the processor , wherein the memory stores instructions executed, when the electronic device is operated in a landscape mode, to enable the at least one processor to: display a first window , on a left-hand of the touch screen, for running a first application and a second window , on a right-hand of the touchscreen, for running a second application on the touchscreen, display a virtual keypad on a portion of the first window and a portion of the second window corresponding to a first input to a text entry window of the second window , receive a drag input starting from a side of the virtual keypad toward a boundary of the first window and the second window , wherein a horizontal size of the virtual keypad is reduced according to the drag input, identify a length of the drag input is greater than or equal to a designated threshold, based on the identification, display the virtual keypad on a lower portion of the second window , wherein the horizontal size of the virtual keypad displayed on the second window and a horizontal size of the second window are identical to each other. display a first window , on a left-hand of the touch screen, for running a first application and a second window , on a right-hand of the touchscreen, for running a second application on the touchscreen, display a virtual keypad on a portion of the first window and a portion of the second window corresponding to a first input to a text entry window of the second window , receive a drag input starting from a side of the virtual keypad toward a boundary of the first window and the second window , wherein a horizontal size of the virtual keypad is reduced according to the drag input, identify a length of the drag input is greater than or equal to a designated threshold, based on the identification, display the virtual keypad on a lower portion of the second window , wherein the horizontal size of the virtual keypad displayed on the second window and a horizontal size of the second window are identical to each other. <EOS>